.period-arrow, .period-menu summary {
  min-height: 48px; color: var(--night); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 12px; list-style: none; cursor: pointer;
}
.period-menu summary::-webkit-details-marker { display: none; }
.period-arrow .icon { color: var(--muted); }
.month-body { touch-action: pan-y; }
.period { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 16px; max-width: 100%; }
.period-arrow { display: grid; place-items: center; width: 48px; height: 48px; flex: none; }
.period-arrow .icon { width: 24px; height: 24px; }
.period-menu { position: relative; min-width: 0; width: min(100%, 224px); }
.period-menu summary { display: grid; place-items: center; padding: 0 8px; text-align: center; font-weight: 800; }
.period-options { position: absolute; z-index: 2; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: min(320px, calc(100vw - 32px)); padding: 12px; box-shadow: 0 12px 34px #0f172a24; }
.year-switch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.year-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.year-months button { min-height: 44px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; font-weight: 800; }
.year-months button.no-movements { background: var(--bg); color: var(--muted); font-weight: 600; }
.year-months button[aria-current] { color: var(--flame-ink); background: var(--ember); border-color: var(--flame-ink); font-weight: 800; }

@media (min-width: 768px) {
  .period { justify-content: flex-start; }
  .period-options { left: 0; transform: none; }
}

:is(.period-arrow, .period-menu summary, .year-months button):focus-visible { outline: 0; border-color: var(--flame-ink); }
