body.loading > header,
body.loading .toolbar,
body.loading main {
  pointer-events: none;
}

button {
  font-weight: 650;
  text-transform: capitalize;
}

.toolbar {
  position: relative;
  z-index: 10;
  background: transparent;
}

.toolbar.detached {
  position: fixed;
  top: 0;
  left: 50%;
  margin-inline: 0;
  transform: translateX(-50%);
  background-attachment: fixed;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.toolbar.detached.animated {
  transition: transform 0.2s ease;
}

.toolbar.detached.collapsed {
  transform: translate(-50%, -100%);
}

header {
  padding-bottom: 0.35rem;
}

.trip-locations-row {
  min-height: 1.5em;
  margin-bottom: 3px;
  padding-top: 2px;
}

.trip-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 0;
  padding-bottom: 2px;
}

.detail-separator {
  margin: 0 8px;
  color: var(--theme-text-subtle);
}

.date-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.date-picker-control {
  position: relative;
  display: inline-flex;
}

.date-picker-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0.5px solid transparent;
  border-radius: 5px;
  padding: 1px 3px;
  background: transparent;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.date-range > .date-picker-control:first-child .date-picker-button {
  margin-left: -4px;
}

.date-picker-button:focus {
  background: var(--theme-surface);
  border-color: var(--theme-accent);
  outline: none;
}

.date-label {
  color: var(--theme-accent-strong);
  font-size: 12px;
  font-weight: 650;
}

.date-display {
  color: var(--theme-control-text-muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.hidden-date-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.date-divider {
  color: var(--theme-text-subtle);
  font-size: 11px;
}

.trip-duration {
  color: var(--theme-text-muted);
  white-space: nowrap;
}

.trip-duration.placeholder {
  color: var(--theme-text-subtle);
}

.location-editor {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 0;
  cursor: text;
}

#location-chips {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 0;
}

.location-editor:not(.editing) #location-chips:empty::before {
  content: "Add Location";
  color: var(--theme-text-subtle);
}

.location-chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--theme-text-muted);
}

.location-chip + .location-chip::before {
  content: "·";
  margin: 0 6px;
  color: var(--theme-text-subtle);
}

.location-chip button {
  display: none;
  border: 0;
  background: transparent;
  color: var(--theme-danger);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  margin-left: 2px;
  padding: 1px 2px;
  border-radius: 3px;
}

.location-editor.editing .location-chip button {
  display: inline-block;
}

.location-editor input {
  display: none;
  width: 76px;
  min-width: 76px;
  border: 0;
  border-bottom: 1px dashed var(--theme-border-strong);
  background: transparent;
  color: var(--theme-text);
  font: inherit;
  font-size: 13px;
  outline: none;
  margin-left: 6px;
  padding: 0 2px;
}

.location-editor.editing input {
  display: inline-block;
}

.location-editor input:focus {
  border-bottom-color: var(--theme-accent);
}

.location-editor input::placeholder {
  color: var(--theme-text-subtle);
}

.location-editor:focus-visible {
  border-radius: 4px;
}

.controls {
  padding: 0 0 4px;
  background: transparent;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.controls .search-field {
  flex: 1 0 100%;
  min-width: 160px;
}

.check-controls {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.check-controls [data-modal-type="category"] {
  margin-left: auto;
}

.manage-label-short {
  display: none;
}

.filter-scroller {
  padding: 4px 0 8px;
  background: transparent;
}

.status-filter-group {
  display: inline-flex;
  gap: 6px;
}

.stats-bar {
  padding: 0.65rem 0.85rem;
  display: flex;
  column-gap: 8px;
  row-gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-lg);
  background: var(--theme-highlight);
}

.stat {
  font-size: 13px;
  color: var(--theme-text-muted);
}

.stat strong {
  display: inline-block;
  min-width: 3ch;
  color: var(--theme-text);
}

#pct {
  min-width: 5ch;
}

.progress-stat-group {
  display: flex;
  flex: 1;
  min-width: 150px;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
}

.progress-wrap {
  flex: 1;
  min-width: 120px;
  height: 5px;
  background: #fff;
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--theme-accent);
  border-radius: 99px;
  transition: width 0.3s;
}

.section {
  padding: 0.75rem;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-lg);
  background: var(--theme-surface);
  transition: border-color 0.15s ease;
}

.section + .section {
  margin-top: 0.8rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 1px 7px;
  margin-bottom: 3px;
}

.section-header:last-child {
  margin-bottom: 0;
  padding-bottom: 2px;
}

.section-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  text-transform: none;
  cursor: pointer;
  user-select: none;
}

.section-title {
  font-size: 14px;
  font-weight: 650;
}

.section-title-input {
  flex: 1;
  min-width: 120px;
  max-width: 360px;
  border: 0;
  border-bottom: 1px solid var(--theme-accent);
  background: var(--theme-surface);
  color: var(--theme-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  padding: 1px 4px;
}

.section-count {
  font-size: 12px;
  color: var(--theme-text-subtle);
  flex-shrink: 0;
}

.chevron {
  font-size: 11px;
  color: var(--theme-text-subtle);
  flex-shrink: 0;
  transition: transform 0.18s;
  display: inline-block;
}

.chevron.open {
  transform: rotate(180deg);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.section-filter-control {
  position: relative;
}

.section-filter-button {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0.5px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--theme-control-text-muted);
  font-size: 12px;
  padding: 3px 6px;
  cursor: pointer;
}

.section-filter-button.open {
  background: var(--theme-surface-raised);
  color: var(--theme-accent-strong);
  border-color: var(--theme-border-strong);
}

.section-filter-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 3px);
  right: 0;
  min-width: 170px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  border: 0.5px solid var(--theme-border-strong);
  border-radius: var(--radius);
  background: var(--theme-surface);
}

.section-filter-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--theme-accent-strong);
  font-size: 12px;
  padding: 6px 8px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.badge-select-control {
  display: contents;
}

.badge-select-button,
.badge-select-menu {
  display: none;
}

.icon-btn {
  background: none;
  border: 0.5px solid transparent;
  cursor: pointer;
  color: var(--theme-control-text-muted);
  font-size: 13px;
  padding: 3px 6px;
  border-radius: var(--radius);
  line-height: 1;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
}

.item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  touch-action: pan-y;
}

.item.editing {
  z-index: 2;
  overflow: visible;
}

.item-swipe-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 100%;
  background: var(--theme-surface);
  border-radius: var(--radius);
  transform: translateX(var(--swipe-x, 0));
  transition: transform 0.2s ease, background 0.15s;
}

.item-drag-handle {
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 0 0 24px;
  padding-top: 11px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--theme-control-text-muted);
  cursor: grab;
  font-size: 15px;
  line-height: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.item-drag-handle:active {
  cursor: grabbing;
}

.item-drag-handle:focus-visible {
  color: var(--theme-accent-strong);
}

.dragging-item,
.dragging-item * {
  cursor: grabbing !important;
}

.item.drag-floating {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  opacity: 0.96;
  transform: scale(1.03);
}

.item.drag-floating .item-swipe-content {
  background: var(--theme-surface-raised);
}

.item.drag-floating .item-drag-handle {
  color: var(--theme-accent-strong);
}

.item.drag-floating .item-actions {
  visibility: hidden;
}

.item.drag-placeholder {
  opacity: 0;
  pointer-events: auto;
}

.section.drag-into {
  border-color: color-mix(in srgb, var(--theme-accent) 55%, var(--theme-border));
  outline: 2px dashed var(--theme-accent);
  outline-offset: 3px;
  border-radius: var(--radius-lg);
}

.item.swiping .item-swipe-content {
  transition: none;
}

.item.swiping {
  cursor: grabbing;
  user-select: none;
}

.swipe-action {
  display: none;
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  width: 96px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0;
  border-radius: var(--radius);
  font-size: 12px;
  transition: opacity 0.12s;
}

.swipe-action span {
  font-size: 16px;
}

.swipe-edit {
  left: 0;
  background: var(--theme-accent-soft);
  color: var(--theme-accent-strong);
}

.swipe-delete {
  right: 0;
  background: var(--theme-danger-soft);
  color: var(--theme-danger);
}

.item.swiping-edit .swipe-edit,
.item.swiping-delete .swipe-delete {
  opacity: 1;
}

.item.checked .item-name {
  text-decoration: line-through;
  color: var(--theme-text-subtle);
}

.item-check-area {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  cursor: pointer;
  padding: 6px 6px 6px 9px;
  min-width: 0;
}

.item input[type=checkbox] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  --checkbox-color: var(--theme-accent);
  cursor: pointer;
}

.item-text {
  min-width: 0;
  flex: 1;
}

.item-name {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.item-subtext {
  font-size: 11px;
  color: var(--theme-text-subtle);
  margin-top: 1px;
  line-height: 1.35;
}

.item-actions {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  width: 30px;
  flex-shrink: 0;
}

.item-edit,
.item-del {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 50%;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: none;
  color: transparent;
  cursor: pointer;
  line-height: 1;
}

.item-edit {
  font-size: 11px;
}

.item-del {
  font-size: 15px;
  font-weight: 650;
}

.item:focus-within .item-edit {
  color: var(--theme-control-text-muted);
}

.item:focus-within .item-del {
  color: var(--theme-danger);
}

.item-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  flex: 1;
  padding: 5px 7px;
  background: var(--theme-surface-raised);
  border-radius: var(--radius);
}

.item-edit-form input,
.item-edit-form select {
  min-width: 110px;
  border: 0.5px solid var(--theme-border-strong);
  border-radius: 5px;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: 12px;
  padding: 5px 7px;
  outline: none;
}

.item-edit-form input:focus,
.item-edit-form select:focus {
  border-color: var(--theme-accent);
}

.item-edit-form .item-edit-name {
  width: 100%;
  min-width: 0;
}

.item-edit-form .item-edit-quantity {
  width: 7ch;
  min-width: 0;
}

.item-edit-form .item-edit-subtext {
  width: 100%;
  min-width: 0;
}

.item-edit-form select {
  width: 10ch;
  min-width: 0;
  max-width: 10ch;
}

.badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  margin-left: 5px;
  vertical-align: middle;
}

.badge,
.badge-pill {
  background: light-dark(var(--badge-text), var(--badge-bg));
  color: light-dark(var(--badge-bg), var(--badge-text));
}

.add-item-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px 9px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.add-item-row input {
  min-width: 140px;
  font-size: 13px;
  padding: 6px 10px;
  border: 0.5px solid var(--theme-border-strong);
  border-radius: var(--radius);
  background: var(--theme-surface);
  color: var(--theme-text);
  outline: none;
}

.add-item-row .add-item-name {
  flex: 1 1 190px;
}

.add-item-row .add-item-quantity {
  flex: 0 0 72px;
  min-width: 72px;
}

.add-item-row .add-item-subtext {
  flex: 2 1 240px;
}

.add-item-row select {
  font-size: 12px;
  padding: 6px 8px;
  border: 0.5px solid var(--theme-border-strong);
  border-radius: var(--radius);
  background: var(--theme-surface);
  color: var(--theme-text-muted);
  cursor: pointer;
  outline: none;
}

.add-item-row input:focus,
.add-item-row select:focus {
  border-color: var(--theme-accent);
}

.add-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--theme-accent);
  cursor: pointer;
  border-radius: var(--radius);
  border: none;
  background: none;
}

/* Creation modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 50;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--theme-surface);
  border: 0.5px solid var(--theme-border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 360px;
  max-width: 90vw;
}

#modal > .modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

#modal-emoji-fields {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.modal h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.modal h4 {
  margin: 0.8rem 0 0.35rem;
  font-size: 12px;
  color: var(--theme-text-muted);
}

.modal label {
  font-size: 13px;
  color: var(--theme-text-muted);
  display: block;
  margin-bottom: 5px;
}

.modal input,
.modal select {
  width: 100%;
  font-size: 14px;
  padding: 8px 10px;
  border: 0.5px solid var(--theme-border-strong);
  border-radius: var(--radius);
  background: var(--theme-surface);
  color: var(--theme-text);
  outline: none;
  margin-bottom: 1rem;
}

.modal input[type=color] {
  height: 42px;
  padding: 4px;
  cursor: pointer;
}

.modal input:focus,
.modal select:focus {
  border-color: var(--theme-accent);
}

.modal input[aria-invalid="true"] {
  border-color: var(--theme-danger);
}

.modal .emoji-search {
  margin-bottom: 6px;
}

.emoji-grid {
  display: grid;
  flex: 1 1 190px;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  min-height: 44px;
  max-height: 190px;
  overflow-y: auto;
  padding: 5px;
  margin-bottom: 1rem;
  border: 0.5px solid var(--theme-border);
  border-radius: var(--radius);
  background: var(--theme-surface-raised);
}

.emoji-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--theme-accent-strong);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.emoji-choice.selected {
  background: var(--theme-accent-soft);
  border-color: var(--theme-accent);
}

.emoji-no-results {
  grid-column: 1 / -1;
  padding: 1rem;
  text-align: center;
  color: var(--theme-text-subtle);
  font-size: 13px;
}

.modal-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.hidden {
  display: none !important;
}

.modal-error:empty {
  display: none;
}

.modal-error:not(:empty) {
  margin: -0.4rem 0 0.75rem;
  padding: 6px 8px;
  border: 0.5px solid var(--theme-danger-border);
  border-radius: 5px;
  background: var(--theme-danger-soft);
  color: var(--theme-danger);
  font-size: 12px;
}

.delete-category-message {
  margin-bottom: 1rem;
  color: var(--theme-text-muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.delete-category-name {
  display: block;
  color: var(--theme-text);
  font-weight: 600;
}

.delete-category-buttons {
  justify-content: center;
}

.delete-category-confirm {
  min-width: 88px;
}

.manage-modal-panel {
  width: 430px;
}

.manage-help {
  margin-top: -0.5rem;
  color: var(--theme-text-subtle);
  font-size: 12px;
  line-height: 1.4;
}

.manage-list {
  max-height: 180px;
  overflow-y: auto;
  border: 0.5px solid var(--theme-border);
  border-radius: var(--radius);
}

.manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px;
  border-bottom: 0.5px solid var(--theme-border);
}

.manage-row:last-child {
  border-bottom: 0;
}

.manage-row > span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.manage-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.manage-row small {
  color: var(--theme-text-subtle);
  font-size: 10px;
  white-space: nowrap;
}

.manage-remove {
  border: 0.5px solid var(--theme-danger-border);
  border-radius: 5px;
  background: var(--theme-danger-soft);
  color: var(--theme-danger);
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
}

.manage-empty {
  padding: 0.75rem;
  color: var(--theme-text-subtle);
  font-size: 12px;
  text-align: center;
}

@media (hover: hover) {
  .date-picker-button:hover {
    background: var(--theme-surface-hover);
    border-color: var(--theme-border-strong);
  }

  .location-chip button:hover {
    color: var(--theme-danger);
    background: var(--theme-danger-soft);
  }

  .section:hover {
    border-color: var(--theme-border-strong);
  }

  .section-filter-button:hover {
    background: var(--theme-surface-raised);
    color: var(--theme-accent-strong);
    border-color: var(--theme-border-strong);
  }

  .section-filter-menu button:hover {
    background: var(--theme-surface-raised);
  }

  .icon-btn:hover {
    background: var(--theme-surface-raised);
    color: var(--theme-accent-strong);
    border-color: var(--theme-border-strong);
  }

  .item:hover .item-swipe-content {
    background: var(--theme-surface-raised);
  }

  .item:hover .item-drag-handle {
    color: var(--theme-accent-strong);
  }

  .item:hover .item-edit {
    color: var(--theme-control-text-muted);
  }

  .item-edit:hover {
    color: var(--theme-accent-strong) !important;
    background: var(--theme-surface-hover);
  }

  .item:hover .item-del {
    color: var(--theme-danger);
  }

  .item-del:hover {
    color: var(--theme-danger) !important;
    background: var(--theme-danger-soft);
  }

  .add-trigger:hover {
    background: var(--theme-surface-raised);
    color: var(--theme-accent);
  }

  .emoji-choice:hover {
    background: var(--theme-surface-hover);
    border-color: var(--theme-border-strong);
  }

  .manage-remove:hover {
    border-color: var(--theme-danger);
  }
}

@media (any-pointer: coarse) {
  .swipe-action {
    display: flex;
  }
}

@media (hover: none) and (pointer: coarse) {
  .item-actions {
    display: none;
  }
}

.no-results {
  padding: 3rem 0;
  text-align: center;
  color: var(--theme-text-subtle);
  font-size: 14px;
}

@media (max-width: 600px) {
  .controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .controls #search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .check-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .check-controls > .btn:not(.manage-filters-button) {
    width: 100%;
    min-width: 0;
  }

  .check-controls .btn {
    height: 34px;
    padding-left: 5px;
    padding-right: 5px;
    font-size: 12px;
  }

  .check-controls > [data-action="open-modal"] {
    grid-column: span 3;
  }

  .check-controls [data-modal-type="category"] {
    margin-left: 0;
  }

  .check-controls #undo,
  .check-controls #redo {
    grid-column: span 2;
    font-size: 18px;
    line-height: 1;
  }

  .check-controls [data-action="check-visible"],
  .check-controls #clear-listed {
    grid-column: span 4;
  }

  .check-controls .manage-filters-button {
    grid-column: span 3;
    width: 100%;
    min-width: 0;
  }

  .manage-label-full {
    display: none;
  }

  .manage-label-short {
    display: inline;
  }

  .section {
    padding: 0.7rem 0.75rem 0.8rem;
  }

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

  .item-actions {
    display: none;
  }

  .swipe-action {
    display: flex;
  }

  .badge-select-control {
    position: relative;
    display: block;
    min-width: 0;
  }

  .badge-select-control > select {
    display: none;
  }

  .badge-select-button {
    display: block;
    width: 100%;
    overflow: hidden;
    border: 0.5px solid var(--theme-border-strong);
    border-radius: var(--radius);
    padding: 6px 24px 6px 8px;
    background: var(--theme-surface);
    color: var(--theme-text-muted);
    font-size: 12px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }

  .badge-select-button::after {
    position: absolute;
    right: 8px;
    content: "▾";
    color: var(--theme-text-subtle);
  }

  .badge-select-button[aria-expanded="true"] {
    border-color: var(--theme-accent);
  }

  .badge-select-menu {
    position: absolute;
    z-index: 35;
    top: calc(100% + 3px);
    right: 0;
    min-width: 150px;
    max-height: 210px;
    overflow-y: auto;
    padding: 4px;
    border: 0.5px solid var(--theme-border-strong);
    border-radius: var(--radius);
    background: var(--theme-surface);
  }

  .badge-select-menu:not([hidden]) {
    display: block;
  }

  .badge-select-menu button {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 5px;
    padding: 6px 8px;
    background: transparent;
    color: var(--theme-accent-strong);
    font-size: 12px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
  }

  .item-edit-form .badge-select-control {
    width: 10ch;
  }

  .add-item-row .badge-select-control {
    flex: 0 1 160px;
  }

  .emoji-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 449px) {
  .progress-stat-group {
    flex: 0;
    min-width: 0;
  }

  .progress-wrap {
    display: none;
  }
}

@media print {
  .toolbar-space {
    height: auto !important;
  }

  .toolbar {
    position: static;
    padding: 0;
    transform: none !important;
  }

  .controls,
  .filter-scroller,
  .stats-bar,
  footer,
  .scroll-to-top,
  .file-actions,
  .add-trigger,
  .add-item-row,
  .section-actions,
  .item-actions,
  .item-edit-form,
  .modal-backdrop {
    display: none !important;
  }

  main {
    padding: 0;
  }

  .item {
    page-break-inside: avoid;
  }

  .editable-heading {
    outline: none;
    background: transparent;
  }

  .location-chip button,
  .location-editor input {
    display: none;
  }
}

.field-help {
  font-weight: 400;
  color: var(--theme-text-subtle);
}
