:root {
    --ink: #111214;
    --paper: #f8f8f6;
    --surface: #ffffff;
    --line: #d8d8d3;
    --accent: #e98a70;
    --activity-blue: #0099f5;
    --focus: #bfd9e3;
    --muted: #626365;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select,
input[type="date"] {
    min-height: 48px;
}

button,
select,
input,
textarea {
    border-radius: 8px;
}

button,
select,
input[type="date"] {
    cursor: pointer;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.site-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 760px;
    padding: 22px 20px;
}

.brand {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.header-actions,
.account-actions {
    align-items: center;
    display: flex;
    gap: 16px;
}

.brand-mark {
    height: 34px;
    margin-right: 10px;
    width: 34px;
}

.account-actions {
    color: var(--muted);
    font-size: 0.85rem;
}

.logout-button {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    min-height: 36px;
    padding: 6px 10px;
}

@media (max-width: 620px) {
    .site-header,
    .header-actions {
        align-items: flex-start;
    }

    .header-actions {
        flex-direction: column;
        gap: 8px;
    }

    .account-actions {
        align-items: flex-end;
        flex-direction: column;
        gap: 6px;
    }
}

.page-shell {
    margin: 0 auto;
    max-width: 760px;
    padding: 14px 20px 52px;
}

.onboarding {
    margin: 0 auto;
    max-width: 460px;
    padding: clamp(46px, 12vh, 120px) 0;
}

.onboarding-brand {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: clamp(54px, 12vh, 110px);
}

.onboarding h1 {
    font-size: clamp(2.2rem, 9vw, 4rem);
    letter-spacing: -0.05em;
    line-height: 1;
    margin: 0 0 34px;
}

.onboarding form {
    display: grid;
    gap: 10px;
}

.text-button {
    background: transparent;
    border: 0;
    color: var(--ink);
    min-height: auto;
    padding: 5px 0;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.onboarding label {
    font-size: 0.95rem;
    font-weight: 800;
}

.onboarding input {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    min-height: 54px;
    padding: 13px 14px;
    width: 100%;
}

.onboarding .primary-button {
    justify-self: start;
    margin-top: 16px;
    min-width: 116px;
}

.editor {
    display: grid;
    gap: 28px;
}

.page-heading h1,
.date-heading-row h2,
.section-heading h2,
.form-heading h2 {
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0;
}

.page-heading h1 {
    font-size: clamp(2.2rem, 8vw, 4rem);
}

.page-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.overview-link {
    align-items: center;
    border: 1px solid var(--ink);
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    font-weight: 700;
    gap: 10px;
    min-height: 48px;
    padding: 11px 16px;
    text-decoration: none;
}

.overview-link:hover {
    background: var(--ink);
    color: var(--surface);
}

.share-link {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    display: inline-flex;
    font-weight: 700;
    min-height: 48px;
    padding: 11px 16px;
    text-decoration: none;
}

.share-link:hover {
    border-color: var(--ink);
    color: var(--ink);
}

@media (max-width: 620px) {
    .page-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .overview-link,
    .share-link {
        justify-content: center;
    }
}

.eyebrow {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0 0 9px;
    text-transform: uppercase;
}

.client-control {
    display: grid;
    gap: 8px;
}

.client-control label,
.appointment-dialog label {
    font-size: 0.9rem;
    font-weight: 800;
}

.client-control select,
.appointment-dialog input,
.appointment-dialog textarea {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 12px 14px;
    width: 100%;
}

.date-panel {
    background: var(--surface);
    border-block: 1px solid var(--line);
    padding: 22px 0;
}

.date-heading-row {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
}

.date-heading-row h2 {
    font-size: clamp(1.45rem, 5vw, 2rem);
}

.icon-button {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1;
    padding: 8px;
}

.date-heading-row .icon-button:last-child {
    justify-self: end;
}

.date-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.secondary-button,
.date-picker-label {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 11px 15px;
}

.date-picker-label {
    cursor: pointer;
}

.date-actions input[type="date"] {
    border: 1px solid var(--line);
    padding: 8px 10px;
}

.section-heading {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
}

.section-heading h2 {
    font-size: 1.35rem;
}

.loading-label,
.empty-state,
.page-status {
    color: var(--muted);
}

.loading-label {
    font-size: 0.9rem;
}

.appointments-list {
    display: grid;
    gap: 0;
    margin-top: 10px;
}

.appointment-row {
    align-items: center;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
    display: grid;
    gap: 18px;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    min-height: 76px;
    padding: 15px 0;
    text-align: left;
    width: 100%;
}

.appointment-row:hover { background: rgba(118, 169, 185, .05); }
.appointment-row:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.appointment-row.is-selected {
    background: rgba(118, 169, 185, .1);
    box-shadow: inset 3px 0 #76a9b9;
}

.appointment-time {
    font-size: 1.05rem;
    font-weight: 800;
}

.appointment-text {
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.appointment-edit-button {
    background: transparent;
    border: 0;
    color: #315f6d;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 10px 8px;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.appointment-controls { align-items: center; display: flex; }
.appointment-actions { align-items: flex-start; display: flex; flex-direction: column; gap: 8px; }
.appointment-actions[hidden] { display: none; }
.appointment-audit { color: var(--muted); display: flex; flex-direction: column; font-size: .82rem; font-weight: 400; line-height: 1.35; margin: 16px 8px 4px; }
.appointment-row-delete-button {
    background: transparent;
    border: 0;
    color: #b42318;
    font-size: 0.85rem;
    font-weight: 800;
    min-height: 44px;
    padding: 10px 8px;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.appointment-row.is-deleted .appointment-time,
.appointment-row.is-deleted .appointment-text {
    color: var(--muted);
    text-decoration: line-through;
}
.appointment-row.is-deleted .appointment-dot { opacity: .45; }
.appointment-deleted-status { color: var(--muted); font-size: .85rem; font-weight: 700; }
.appointment-recurring-icon {
    color: #315f6d;
    display: inline-grid;
    font-size: 1.2rem;
    place-items: center;
}
.appointment-recurring-icon[hidden] { display: none; }

.empty-state {
    border-top: 1px solid var(--line);
    margin: 10px 0 0;
    padding: 24px 0;
}

.primary-button {
    background: var(--ink);
    border: 2px solid var(--ink);
    color: #fff;
    font-weight: 800;
    padding: 13px 18px;
}

.editor > .primary-button {
    justify-self: start;
}

.page-status {
    background: var(--surface);
    border-left: 4px solid var(--accent);
    margin-bottom: 20px;
    padding: 16px;
}

.access-screen {
    margin: clamp(48px, 12vh, 120px) auto;
    max-width: 560px;
    padding: 0 20px;
}

.access-screen h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin: 0 0 24px;
}

.access-screen > p {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.appointment-dialog {
    background: var(--paper);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(17, 18, 20, 0.2);
    color: var(--ink);
    max-width: min(92vw, 520px);
    padding: 28px;
    width: 100%;
}

.appointment-dialog::backdrop {
    background: rgba(17, 18, 20, 0.42);
}

.appointment-dialog form {
    display: grid;
    gap: 9px;
}

.form-heading {
    margin-bottom: 12px;
}

.form-heading h2 {
    font-size: 1.8rem;
}

.appointment-dialog textarea {
    min-height: 100px;
    resize: vertical;
}

.form-error {
    color: #a32626;
    font-size: 0.9rem;
    margin: 5px 0 0;
}

.time-choice input[aria-invalid="true"] {
    border-color: #a32626;
}

.save-success {
    color: #2f7a4d;
    font-size: 0.9rem;
    font-weight: 700;
    margin: 5px 0 0;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

.form-actions button {
    flex: 1;
}

@media (min-width: 640px) {
    .site-header {
        padding-top: 30px;
    }

    .page-shell {
        padding-top: 28px;
    }

    .editor {
        gap: 34px;
    }
}

@media (max-width: 480px) {
    .appointment-row {
        gap: 12px;
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .form-actions {
        flex-direction: column-reverse;
    }
}

/* Planner layout */
.sr-only {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.site-header {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    max-width: 1440px;
    padding-inline: clamp(20px, 4vw, 58px);
}

.header-context { align-items: center; display: flex; min-width: 0; }
.header-client-control {
    border-left: 1px solid var(--line);
    margin-left: 24px;
    padding-left: 24px;
}

.header-client-control select {
    background: var(--surface);
    border: 1px solid var(--line);
    min-width: 150px;
    padding: 10px 36px 10px 14px;
}
.header-client-name { font-size: 1.35rem; line-height: 1.2; white-space: nowrap; }

.header-actions {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-self: end;
    flex-wrap: wrap;
}

.navigation-menu { position: relative; }
.navigation-menu-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--ink);
    display: inline-flex;
    flex-direction: column;
    font-weight: 700;
    gap: 4px;
    justify-content: center;
    min-width: 52px;
    padding: 5px 6px;
}
.navigation-menu-toggle:hover { color: #315f6d; }
.navigation-menu-icon { display: grid; gap: 4px; width: 30px; }
.navigation-menu-icon span { background: currentColor; height: 2px; width: 100%; }
.navigation-menu-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(17, 18, 20, .14);
    min-width: 230px;
    padding: 10px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
}
.navigation-user {
    align-items: center;
    display: flex;
    gap: 12px;
    padding: 4px 6px 10px;
}
.navigation-user-avatar {
    align-items: center;
    background: #e6f0fa;
    border-radius: 50%;
    color: #1d3650;
    display: inline-flex;
    flex: 0 0 38px;
    font-size: 1.05rem;
    font-weight: 700;
    height: 38px;
    justify-content: center;
    width: 38px;
}
.navigation-user-details { display: grid; min-width: 0; }
.navigation-user-details strong,
.navigation-user-details span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navigation-user-details strong { font-size: .9rem; }
.navigation-user-details span { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.navigation-menu-separator { border-top: 1px solid var(--line); margin: 4px 0; }
.navigation-menu-panel a,
.navigation-menu-item {
    align-items: center;
    border-radius: 6px;
    background: transparent;
    border: 0;
    color: var(--ink);
    display: flex;
    font: inherit;
    gap: 12px;
    min-height: 42px;
    padding: 9px 8px;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
}
.navigation-menu-panel a:hover,
.navigation-menu-item:not(:disabled):hover { background: rgba(118, 169, 185, .1); }
.navigation-menu-item:disabled { color: var(--muted); cursor: default; opacity: .75; }
.navigation-menu-item-icon { fill: none; flex: 0 0 20px; height: 20px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 20px; }

.feedback-widget { position: relative; }
.feedback-label-mobile { display: none; }

/* Keep feedback visible but visually quiet during the development phase. */
.feedback-toggle {
    padding: 11px 16px;
}

.feedback-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 18px;
    padding: 16px;
}

.feedback-panel-title { font-weight: 800; margin: 0; }
.feedback-panel-prompt { color: var(--muted); font-size: .85rem; margin: 4px 0 10px; }
.feedback-panel textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 96px;
    padding: 10px 12px;
    resize: vertical;
    width: 100%;
}
.feedback-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 10px; }
.feedback-submit { min-height: 44px; }

.page-shell {
    max-width: 1440px;
    padding: 18px clamp(20px, 4vw, 58px) 64px;
}

.editor { display: block; }

.planner-layout {
    background: var(--surface);
    border: 1px solid rgba(17, 18, 20, .08);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(17, 18, 20, .07);
    display: grid;
    grid-template-columns: minmax(360px, .85fr) minmax(480px, 1.15fr);
    min-height: calc(100svh - 170px);
    overflow: hidden;
}

.appointment-entry,
.appointments-overview {
    padding: clamp(30px, 4vw, 54px);
}

.appointment-entry { border-right: 1px solid var(--line); }
.appointment-entry h1 { scroll-margin-top: 24px; }

.appointment-entry h1,
.appointments-overview h2 {
    font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    letter-spacing: -.045em;
    line-height: 1;
    margin: 0 0 46px;
}

.appointment-entry form { display: grid; gap: 14px; }
.appointment-entry form > label,
.date-choices legend { font-size: .9rem; font-weight: 800; }

.appointment-entry input {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 58px;
    padding: 13px 16px;
    width: 100%;
}

.date-choices,
.time-choice { border: 0; margin: 0; padding: 0; }
.date-choices { display: grid; grid-template-columns: 1fr 1fr 1.2fr; margin-bottom: 26px; position: relative; }
.date-choices legend { margin-bottom: 12px; }
.date-choice {
    background: #fff;
    border: 1px solid var(--line);
    display: flex;
    min-height: 76px;
    min-width: 0;
}
.date-choice:first-of-type { border-radius: 8px 0 0 8px; }
.date-choice + .date-choice { border-left: 0; }
.date-choice:last-of-type { border-radius: 0 8px 8px 0; }
.date-choice.is-active {
    border-color: #76a9b9;
    box-shadow: inset 0 0 0 1px #76a9b9;
    color: #315f6d;
    position: relative;
    z-index: 1;
}
.date-choice-button {
    align-items: flex-start;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: inherit;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 12px 16px;
    text-align: left;
    width: 100%;
}
.date-choice-button strong { font-size: .92rem; }
.date-choice-button span { color: var(--muted); font-size: .82rem; margin-top: 5px; }
.date-picker-field {
    flex-direction: column;
    justify-content: center;
    padding: 12px 16px;
}
.date-picker-field label { font-size: .92rem; font-weight: 800; }
.date-choices #appointment-date {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--muted);
    font: inherit;
    font-size: .82rem;
    margin-top: 5px;
    min-height: 22px;
    min-width: 0;
    padding: 0;
}
.date-picker-field:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.date-choices #appointment-date:focus-visible { outline: 0; }

.time-choice {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr auto 1fr;
    margin: 24px 0 8px;
}
.time-choice label { display: grid; gap: 8px; min-width: 0; }
.time-field-label { font-size: .9rem; font-weight: 800; }
.time-field-label span:last-child { color: var(--muted); font-weight: 400; }
.new-line { display: block; }
.time-choice > span[aria-hidden] { align-self: end; display: grid; min-height: 58px; place-items: center; }

.repeat-section { display: grid; gap: 14px; }
.repeat-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    display: grid;
    font-weight: 800;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 10px 14px;
    text-align: left;
    width: 100%;
}
.repeat-toggle:hover { border-color: #76a9b9; }
.repeat-toggle-symbol { color: #315f6d; font-size: 1.2rem; }
.repeat-toggle-icon,
.appointment-chevron {
    display: inline-block;
    font-size: 1.1rem;
    height: 1em;
    line-height: 1;
    position: relative;
    width: 1em;
}
.repeat-toggle-icon::before,
.appointment-chevron::before {
    border-bottom: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    content: "";
    height: .4em;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: .4em;
}
.repeat-toggle[aria-expanded="true"] .repeat-toggle-icon::before,
.appointment-row[aria-expanded="true"] .appointment-chevron::before {
    transform: translate(-50%, -50%) rotate(225deg);
}
.repeat-toggle-icon { justify-self: end; }
.appointment-chevron { flex-shrink: 0; margin-left: auto; pointer-events: none; }
.appointment-controls { gap: 8px; }
.appointment-row.is-deleted .appointment-chevron { display: none; }
.repeat-summary { color: var(--muted); font-size: .88rem; line-height: 1.45; margin: 0; white-space: pre-line; }
.repeat-options { display: grid; gap: 14px; }
.repeat-weekdays {
    border: 0;
    display: grid;
    gap: 10px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding: 4px 0;
}
.repeat-weekdays legend { font-size: .9rem; font-weight: 800; margin-bottom: 8px; }
.repeat-weekdays label { align-items: center; display: flex; gap: 10px; min-height: 44px; }
.appointment-entry .repeat-weekdays input { min-height: 22px; padding: 0; width: 22px; }
.repeat-until { display: grid; gap: 14px; }
.repeat-until label { font-size: .9rem; font-weight: 800; }

.appointment-entry .primary-button { margin-top: 16px; min-height: 58px; width: 100%; }
.appointment-entry { min-width: 0; background: var(--surface); }
.appointment-entry .activity-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 10px; }
.appointment-entry .activity-option { display: grid; gap: 8px; min-width: 0; }
.appointment-entry .activity-option label { font-size: .9rem; font-weight: 800; }
.appointment-entry .activity-option select {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    min-height: 58px;
    min-width: 0;
    padding: 12px;
    width: 100%;
}
.appointment-entry .time-choice { margin: 0; }
.appointment-entry .date-choices { min-width: 0; grid-template-columns: 1fr 1fr 1.3fr; margin-bottom: 12px; }
.appointment-entry .date-choice.is-active {
    background: #edf7ff;
    border-color: var(--activity-blue);
    box-shadow: inset 0 0 0 1px var(--activity-blue);
    color: #1674b8;
}
.appointment-entry .date-picker-field { position: relative; }
.appointment-entry #selected-short-date { color: var(--muted); font-size: .82rem; margin-top: 5px; }
.appointment-entry .date-choices #appointment-date {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.activity-primary-button { background: var(--activity-blue); border-color: var(--activity-blue); color: #fff; font-weight: 600; }
.appointment-entry .repeat-section:has(.repeat-options[hidden]) { display: none; }
.delete-appointment-button {
    background: transparent;
    border: 0;
    color: #a32626;
    font-weight: 700;
    justify-self: center;
    padding: 10px 14px;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.appointments-overview .section-heading { margin-bottom: 12px; }
.appointments-overview { container-type: inline-size; container-name: appointments; }
.appointments-overview .section-heading h2 { margin-bottom: 0; }
.appointments-list { margin: 0; }
.appointment-group { padding: 26px 0; }
.appointment-group h3 { font-size: 1.15rem; letter-spacing: -.02em; margin: 0 0 18px; }
.later-groups > .later-title { font-size: 1.1rem; margin: 30px 0 0; }
.later-groups .appointment-group { padding-left: 0; }
.appointment-row {
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 0;
    gap: 14px;
    grid-template-columns: 110px 10px minmax(0, 1fr) auto;
    min-height: 62px;
    padding: 12px 14px;
}
.appointment-row:first-of-type { border-radius: 8px 8px 0 0; }
.appointment-row:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.appointment-row:only-of-type { border-radius: 8px; }
.appointment-time { color: var(--muted); font-size: .9rem; font-weight: 500; }
.appointment-dot { background: #76a9b9; border-radius: 50%; height: 7px; width: 7px; }
.appointment-text { font-size: 1rem; }
.appointment-edit-button { min-height: 44px; }

/* Selected-row actions sit left-aligned directly under the appointment text at every width. */
.appointment-row:has(.appointment-actions:not([hidden])) > .appointment-text { grid-column: 3 / -1; }
.appointment-row:has(.appointment-actions:not([hidden])) > .appointment-controls {
    grid-column: 3 / -1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
}

@media (max-width: 1000px) {
    .planner-layout { grid-template-columns: 1fr; }
    .appointment-entry { border-bottom: 1px solid var(--line); border-right: 0; }
}

@media (max-width: 680px) {
    .appointment-entry .activity-options { gap: 12px; }
    .appointment-entry .activity-option select { font-size: .875rem; padding-inline: 6px; }
    .appointment-entry .date-choice-button, .appointment-entry .date-picker-field { padding-inline: 6px; }
    .appointment-entry .date-choice-button strong, .appointment-entry .date-picker-field label { font-size: .82rem; }
    .site-header { align-items: center; column-gap: 12px; row-gap: 16px; }
    .header-context { grid-column: 1; grid-row: 1; }
    .header-context .brand { flex-shrink: 0; font-size: 1rem; letter-spacing: 0; }
    .header-context .brand-mark { height: 28px; margin-right: 6px; width: 28px; }
    .header-client-control { margin-left: 10px; min-width: 0; padding-left: 10px; }
    .header-client-name { display: block; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; }
    .header-client-control select {
        background-color: transparent;
        border: 0;
        font-size: 1.1rem;
        max-width: 100%;
        min-width: 0;
        padding: 10px 0;
        width: 100%;
    }
    .header-actions { display: contents; }
    .navigation-menu { grid-column: 2; grid-row: 1; }
    .navigation-menu-toggle { min-width: 48px; }
    .feedback-widget { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
    .feedback-toggle { padding-inline: 24px; }
    .feedback-label-desktop { display: none; }
    .feedback-label-mobile { display: inline; }
    .page-shell { padding-inline:12px; }
    .planner-layout { border-radius:12px; }
    .appointment-entry,.appointments-overview { padding:30px 20px; }
    .appointment-entry h1,.appointments-overview h2 { margin-bottom:32px; }
    .date-choice-button,.date-picker-field { padding-inline:10px; }
    .appointment-row { gap:9px; grid-template-columns:68px 8px minmax(0,1fr) auto; padding-inline:8px; }
    .appointment-time { font-size:.78rem; }
}
