.filter-btn--period {
  flex-shrink: 1;
  min-width: 0;
  max-width: 46%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-btn--period svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--text-3);
}

.filter-row {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
  max-width: 100%;
  flex-shrink: 0;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius);
  background: var(--surface-2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}

.filter-btn.on {
  background: var(--text);
  color: var(--surface);
}

@keyframes modal-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Empty state ───────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-3);
  font-size: 14px;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.view.active .view-body { animation: in 0.15s ease; }

/* ── Desktop frame ─────────────────────────────────────────── */
@media (min-width: 520px) {
  html {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    height: auto;
    min-height: 100dvh;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: var(--max-w);
    height: calc(100dvh - 48px);
    height: calc(100svh - 48px);
    max-height: calc(100dvh - 48px);
    max-height: calc(100svh - 48px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .bottom-nav {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .tx-modal {
    border-radius: var(--radius-lg);
    margin-bottom: 0;
    height: min(36svh, calc(100svh - 48px - 48px));
    max-height: min(36svh, calc(100svh - 48px - 48px));
  }

  .tx-modal-overlay {
    align-items: center;
    padding: 24px 16px;
  }

  .tag-modal {
    border-radius: var(--radius-lg);
    margin-bottom: 0;
    max-height: calc(100svh - 48px - 48px);
  }

  .tag-modal-overlay {
    align-items: center;
    padding: 24px 16px;
  }

  .tag-edit-modal {
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
  }

  .topbar { padding: 0 16px; gap: 12px; }
  .period-btn { font-size: 13px; padding: 6px 10px; max-width: none; }
}
