/* Klaro Daily V78: mobile refinement of the established light interface.
   App shell and ordinary forms only; chat, voice dock and liquid orb own their UI. */

.kd-premium .shell :is(.panelhead, .section-header) > * {
  min-width: 0;
}
.kd-premium .shell :is(.panelhead h2, .panelhead h3) {
  text-wrap: balance;
  line-height: 1.3;
}
.kd-premium .shell :is(.field, .kd-nutri-field, .setup-form label) {
  min-width: 0;
}
.kd-premium .shell :is(.help, .field-error, .kd-nutri-error) {
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.kd-premium .shell :is(.input, .select, .textarea):disabled {
  color: #6b687d;
  background: #f3f3f8;
  opacity: 1;
}
.kd-premium .shell :is(.empty, .kd-empty) {
  padding: 24px 16px;
  border-radius: 16px;
  background: #f8f8fc;
}
.kd-premium .shell :is(.empty, .kd-empty) strong {
  font-size: 17px;
  line-height: 1.4;
}
.kd-premium .shell :is(.empty, .kd-empty) p {
  max-width: 32ch;
  margin-bottom: 12px;
}
.kd-premium .shell .kd-news-item {
  min-height: 48px;
  align-items: center;
}
.kd-premium .shell .kd-news-item strong {
  font-weight: 650;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .kd-premium .shell .main {
    padding-inline: clamp(13px, 4vw, 18px);
  }
  .kd-premium .shell .topbar {
    gap: 10px;
    min-height: 46px;
    margin-bottom: 16px;
  }
  .kd-premium .shell .mobile-brand {
    min-height: 44px;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
    font-size: 18px;
  }
  .kd-premium .shell .topactions {
    flex-shrink: 0;
  }
  .kd-premium .shell .topbar .global-search-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 14px;
  }
  .kd-premium .shell :is(.panel, .task-panel) {
    margin-bottom: 16px;
  }
  .kd-premium .shell .panelhead {
    align-items: flex-start;
    gap: 8px 12px;
    margin-bottom: 14px;
  }
  .kd-premium .shell .panelhead > :is(.btn, .text-button) {
    align-self: center;
    white-space: normal;
  }
  .kd-premium .shell :is(.input, .select, .textarea),
  .kd-premium #modal-root :is(.input, .select, .textarea) {
    min-height: 50px;
    border-radius: 13px;
    padding: 12px 13px;
    font-size: 16px;
  }
  .kd-premium .shell textarea:is(.input, .textarea),
  .kd-premium #modal-root textarea:is(.input, .textarea) {
    min-height: 104px;
    max-width: 100%;
  }
  .kd-premium .shell :is(.form-actions, .work-actions, .kd-nutri-actions) {
    gap: 10px;
    flex-wrap: wrap;
  }
  .kd-premium .shell :is(.form-actions, .work-actions, .kd-nutri-actions) > .btn {
    min-height: 48px;
    white-space: normal;
  }
  .kd-premium #view-today .quick-entry-heading {
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }
  .kd-premium #view-today .quick-entry h2 {
    font-size: 19px;
    line-height: 1.3;
  }
  .kd-premium #view-today .quick-entry-line {
    gap: 9px;
  }
  .kd-premium #view-today .quick-entry-line .quick-submit {
    min-width: 50px;
    min-height: 50px;
    border-radius: 14px;
  }
  .kd-premium #view-today .date-choices {
    gap: 5px;
    flex-wrap: wrap;
  }
  .kd-premium #view-today .date-choices button {
    min-height: 44px;
    padding-inline: 12px;
    font-size: 13px;
  }
  .kd-premium #view-today .capture-actions {
    gap: 5px;
  }
  .kd-premium #view-today .capture-actions button {
    min-height: 44px;
    padding-inline: 5px;
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
  }
  .kd-premium #view-today .daily-shortcuts {
    gap: 9px;
    margin-block: 14px;
  }
  .kd-premium #view-today .daily-shortcuts button {
    min-height: 74px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 3px 8px;
    padding: 12px 10px;
  }
  .kd-premium #view-today .daily-shortcuts .kd-v53-shortcut-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }
  .kd-premium #view-today .daily-shortcuts strong {
    font-size: 13px;
    line-height: 1.3;
  }
  .kd-premium #view-today .daily-shortcuts small {
    font-size: 11px;
    line-height: 1.45;
  }
  .kd-premium .shell :is(.organizer-tabs, .kd-fit-tabs, .kd-music-tabs, .time-tabs) {
    gap: 6px;
  }
  .kd-premium .shell :is(.organizer-tabs, .kd-fit-tabs, .kd-music-tabs, .time-tabs) > button {
    min-height: 46px;
    padding-block: 10px;
    line-height: 1.35;
  }
  .kd-premium #bottom-nav.bottombar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(0, 1.28fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 3px;
    padding-inline: max(6px, env(safe-area-inset-left)) max(6px, env(safe-area-inset-right));
    padding-top: 7px;
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }
  .kd-premium #bottom-nav.bottombar button {
    min-width: 0;
    min-height: 58px;
    padding: 7px 1px;
    gap: 5px;
    border-radius: 15px;
    font-size: 11px;
    line-height: 1.3;
  }
  .kd-premium #bottom-nav.bottombar button > span {
    overflow: visible;
    text-overflow: unset;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .kd-premium #bottom-nav.bottombar button.active {
    background: linear-gradient(130deg, #eeebfc, #eaf4f0);
    color: #51479a;
    box-shadow: inset 0 0 0 1px #dddced;
  }
  .kd-premium #bottom-nav.bottombar button .icon {
    width: 22px;
    height: 22px;
  }
  .kd-premium #modal-root .modal {
    border-radius: 22px;
  }
  .kd-premium #modal-root .modalheader {
    gap: 12px;
  }
  .kd-premium #modal-root .modalheader > div {
    min-width: 0;
  }
  .kd-premium #modal-root .modalheader .close {
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
  }
  .kd-premium #modal-root .modalfoot {
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .kd-premium .shell .mobile-brand {
    font-size: 17px;
  }
  .kd-premium #view-today .quick-entry h2 {
    font-size: 18px;
  }
  .kd-premium #view-today .daily-shortcuts button {
    grid-template-columns: 29px minmax(0, 1fr);
    gap: 3px 6px;
    padding-inline: 8px;
  }
  .kd-premium #view-today .daily-shortcuts .kd-v53-shortcut-icon {
    width: 29px;
    height: 29px;
  }
  .kd-premium #view-today .daily-shortcuts strong {
    font-size: 12px;
  }
  .kd-premium #bottom-nav.bottombar {
    gap: 2px;
    padding-inline: max(4px, env(safe-area-inset-left)) max(4px, env(safe-area-inset-right));
  }
  .kd-premium #bottom-nav.bottombar button {
    font-size: 10px;
    letter-spacing: 0;
  }
  .kd-premium .shell :is(.organizer-form, .setup-form, .kd-nutri-form) .fieldrow {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kd-premium .shell :is(.btn, .daily-shortcuts button, .kd-more-link) {
    transition: none;
  }
}

@media (forced-colors: active) {
  .kd-premium #bottom-nav.bottombar button.active,
  .kd-premium .shell :is(.empty, .kd-empty) {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
}

/* Keep secondary information legible without changing its visual hierarchy. */
.privacy-summary { margin: 20px 0; }
.privacy-summary > div { padding: 14px 0; border-bottom: 1px solid #e4e0ec; }
.privacy-summary dt { font-weight: 700; }
.privacy-summary dd { margin: 6px 0 0; overflow-wrap: anywhere; }
.kd-premium #quick-composer :is(.local-label, .date-choices button:not(.active),
  .quick-overview[data-state="empty"] h3, .quick-overview-head h3 small,
  .quick-overview .meta, .progress-summary) {
  color: #656b7e;
}
.kd-premium #view-radio :is(#kd-radio-now-detail, #kd-radio-result-count,
  .kd-radio-station p, .kd-radio-privacy) {
  color: #6e607c;
}
.kd-premium #view-radio .kd-radio-station-mark[data-genre="chill"] { color: #286957; }
.kd-premium #view-radio .kd-radio-station-mark[data-genre="dance"] { color: #89502b; }
.kd-premium #view-radio .kd-radio-station-mark[data-genre="wort"] { color: #465f8b; }

/* Reflow actual controls with enlarged text; preserve every navigation target. */
.kd-premium .shell .kd-more-link .kd-v53-icon {
  min-width: 1.4em;
  min-height: 1.4em;
}
.kd-premium .shell :is(button, a[href], summary, input, select, textarea):focus-visible,
.kd-premium #bottom-nav button:focus-visible,
.kd-premium #modal-root :is(button, a[href], input, select, textarea):focus-visible {
  outline: 3px solid #6252b5;
  outline-offset: 3px;
}

/* Immediate press feedback without moving the layout or adding motion. */
.kd-premium .shell button,
.kd-premium #modal-root button,
.kd-premium #bottom-nav button { touch-action: manipulation; }
.kd-premium .shell :is(.btn, .quick-submit, .daily-shortcuts button, .kd-more-link):active:not(:disabled),
.kd-premium #bottom-nav button:active:not(:disabled) { filter: brightness(.95); }

/* A headline stays one readable link, with source and publication time below. */
.kd-premium .shell .kd-news-meta { display: block; margin-top: 6px; color: #656b7e; font-size: .75rem; line-height: 1.55; }
.kd-premium .shell .kd-news-meta time { display: inline; margin: 0; font: inherit; color: inherit; }
