.nd-app { min-width: 0; }
.nd-today { padding: 1.25rem 0; }
.nd-today h2 { font-size: 2rem; }
.nd-today .nd-name { font-size: 1.3rem; }
.nd-neighbours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.nd-name { display: inline-block; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface); color: var(--text); font: inherit; padding: .45rem; margin: .15rem; cursor: pointer; overflow-wrap: anywhere; max-width: 100%; }
.nd-app button:focus-visible, .nd-app input:focus-visible, .nd-app select:focus-visible, .nd-app summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nd-app details { margin-top: .75rem; }
.nd-app summary { cursor: pointer; }
.nd-suggestions { display: flex; flex-wrap: wrap; list-style: none; padding: 0; min-height: 3.5rem; }
.nd-result { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.nd-result p { overflow-wrap: anywhere; }
.nd-result button { flex-shrink: 0; }
.nd-month-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1.5rem; }
.nd-month-nav h2 { text-align: center; font-size: 1.2rem; }
.nd-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; }
.nd-day { min-width: 0; border: 1px solid var(--border); border-radius: .35rem; padding: .25rem; overflow-wrap: anywhere; }
.nd-day time { display: block; font-weight: 700; }
.nd-day .nd-name { font-size: .8rem; padding: .3rem .1rem; margin: .15rem 0; width: 100%; }
.nd-day[aria-current] { border: 2px solid var(--accent); }
.nd-weekday { text-align: center; font-size: .8rem; overflow-wrap: anywhere; }
.nd-day .hint { font-size: .75rem; }
.nd-sources { margin-top: 1.5rem; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .nd-neighbours { grid-template-columns: 1fr; }
  .nd-result { align-items: flex-start; flex-direction: column; }
  .nd-month-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nd-month-nav h2 { grid-column: 1 / -1; grid-row: 1; }
  .nd-month-nav button { min-width: 0; overflow-wrap: anywhere; }
  .nd-month-grid { gap: .1rem; }
  .nd-day { padding: .1rem; }
  .nd-day .nd-name { font-size: .7rem; }
}

/* Today, yesterday and tomorrow are filled by the script; reserve their height so the search form does not jump (CLS). */
#nd-today:empty { min-height: 12rem; }
#nd-yesterday:empty, #nd-tomorrow:empty { min-height: 9rem; }
