:root {
    --color-primary: #173E39;
    --color-primary-hover: #12312D;
    --color-primary-soft: #E8F0EE;
    --color-accent: #B03A6B;
    --color-accent-soft: #F8E8EF;
    --color-success: #4F7A5A;
    --color-success-soft: #EDF5EF;
    --color-logo-green-soft: #EEF4E9;
    --color-warning: #C48A3A;
    --color-warning-soft: #FBF4E8;
    --color-danger: #B34747;
    --color-danger-soft: #F8EAEA;
    --color-bg: #F6F8FA;
    --color-surface: #FFFFFF;
    --color-surface-secondary: #F1F4F7;
    --color-text: #24313D;
    --color-text-muted: #5E6B78;
    --color-text-subtle: #7D8894;
    --color-placeholder: var(--color-text-subtle);
    --color-border: #D6DEE6;
    --color-border-strong: #BCC8D3;
    --color-overlay: rgba(36, 49, 61, 0.28);
    --color-overlay-strong: rgba(36, 49, 61, 0.38);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06);
    --rr-main-color: var(--color-primary);
    --rr-background-color: var(--color-bg);
    --rr-workarea-background-color: var(--color-bg);
    --rr-app-background-color: var(--rr-background-color);
    --rr-status-area-color: #E2D1B7;
    --rr-app-background-image:
        radial-gradient(circle at 15% 10%, rgb(255 255 255 / 0.26), transparent 46%),
        radial-gradient(circle at 85% 80%, rgb(72 103 91 / 0.09), transparent 52%),
        radial-gradient(circle at 52% 42%, rgb(176 58 107 / 0.045), transparent 58%),
        url("/system/images/backgrounds/subtle-marble-light.webp");
    --rr-app-background-repeat: no-repeat, no-repeat, no-repeat, repeat;
    --rr-app-background-size: cover, cover, cover, 1024px 1024px;
    --rr-page-panel-background: transparent;
    --rr-font-family-system: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --rr-font-family: var(--rr-font-family-system);
    --rr-page-heading-font: var(--rr-font-family);
    --rr-text-xs: 0.75rem;
    --rr-text-sm: 0.875rem;
    --rr-text-base: 1rem;
    --rr-text-lg: 1.125rem;
    --rr-text-xl: 1.25rem;
    --rr-text-2xl: 1.5rem;
    --rr-text-3xl: 1.875rem;
    --rr-line-tight: 1.2;
    --rr-line-normal: 1.5;
    --rr-line-loose: 1.65;
    --rr-weight-regular: 400;
    --rr-weight-medium: 500;
    --rr-weight-semibold: 600;
    --rr-weight-body: var(--rr-weight-regular);
    --rr-weight-label: var(--rr-weight-regular);
    --rr-weight-input: var(--rr-weight-regular);
    --rr-weight-heading: var(--rr-weight-semibold);
    --rr-weight-action: var(--rr-weight-semibold);
    --rr-weight-emphasis: var(--rr-weight-semibold);
    --rr-input-font-size: var(--rr-text-base);
    --rr-field-prompt-font-size: var(--rr-text-sm);
    --rr-input-font-weight: var(--rr-weight-input);
    --rr-surface-color: var(--color-surface);
    --rr-border-color: var(--color-border);
    --rr-text-color: var(--color-text);
    --rr-shadow: var(--shadow-md);
}

html[data-background-style="paper"] {
    --rr-app-background-image:
        radial-gradient(circle at 15% 10%, rgb(255 255 255 / 0.26), transparent 46%),
        radial-gradient(circle at 85% 80%, rgb(72 103 91 / 0.09), transparent 52%),
        radial-gradient(circle at 52% 42%, rgb(176 58 107 / 0.045), transparent 58%),
        url("/system/images/backgrounds/subtle-paper-light.webp");
    --rr-app-background-size: cover, cover, cover, 512px 512px;
}

html[data-background-style="sand"] {
    --rr-app-background-image:
        radial-gradient(circle at 15% 10%, rgb(255 255 255 / 0.18), transparent 46%),
        radial-gradient(circle at 85% 80%, rgb(122 83 40 / 0.08), transparent 52%),
        radial-gradient(circle at 52% 42%, rgb(202 145 64 / 0.05), transparent 58%),
        url("/system/images/backgrounds/subtle-sand-light.webp");
    --rr-app-background-size: cover, cover, cover, 1024px 1024px;
}

html[data-background-style="green_marble"] {
    --rr-app-background-image:
        radial-gradient(circle at 15% 10%, rgb(255 255 255 / 0.26), transparent 46%),
        radial-gradient(circle at 85% 80%, rgb(72 103 91 / 0.09), transparent 52%),
        radial-gradient(circle at 52% 42%, rgb(176 58 107 / 0.045), transparent 58%),
        url("/system/images/backgrounds/subtle-green-marble-light.webp");
    --rr-app-background-size: cover, cover, cover, 1024px 1024px;
}

html[data-background-style="water"] {
    --rr-app-background-image:
        radial-gradient(circle at 15% 10%, rgb(255 255 255 / 0.16), transparent 46%),
        radial-gradient(circle at 85% 80%, rgb(51 110 126 / 0.06), transparent 52%),
        url("/system/images/backgrounds/subtle-water-light.webp");
    --rr-app-background-repeat: no-repeat, no-repeat, no-repeat;
    --rr-app-background-size: cover, cover, cover;
}

html.is-mobile-device[data-background-style="water"] {
    min-height: 100vh;
    min-height: 100lvh;
    background-repeat: no-repeat;
    background-size: 100vw 100vh;
    background-size: 100vw 100lvh;
}

@media (prefers-color-scheme: dark) {
    :root {
        --rr-app-background-color: #202832;
        --rr-status-area-color: #2B3541;
        --rr-app-background-image:
            radial-gradient(circle at 18% 12%, rgb(255 255 255 / 0.035), transparent 48%),
            radial-gradient(circle at 82% 84%, rgb(0 0 0 / 0.045), transparent 54%),
            url("/system/images/backgrounds/subtle-marble-dark.webp");
        --rr-app-background-repeat: no-repeat, no-repeat, repeat;
        --rr-app-background-size: cover, cover, 1024px 1024px;
        --rr-page-panel-background: color-mix(in srgb, var(--rr-surface-color) 90%, transparent);
    }

    html[data-background-style="paper"] {
        --rr-app-background-image:
            radial-gradient(circle at 18% 12%, rgb(255 255 255 / 0.035), transparent 48%),
            radial-gradient(circle at 82% 84%, rgb(0 0 0 / 0.045), transparent 54%),
            url("/system/images/backgrounds/subtle-paper-dark.webp");
        --rr-app-background-size: cover, cover, 320px 320px;
    }

    html[data-background-style="sand"] {
        --rr-app-background-image:
            radial-gradient(circle at 18% 12%, rgb(255 255 255 / 0.03), transparent 48%),
            radial-gradient(circle at 82% 84%, rgb(0 0 0 / 0.04), transparent 54%),
            url("/system/images/backgrounds/subtle-sand-dark.webp");
        --rr-app-background-size: cover, cover, 1024px 1024px;
    }


    html[data-background-style="green_marble"] {
        --rr-app-background-image:
            radial-gradient(circle at 18% 12%, rgb(255 255 255 / 0.035), transparent 48%),
            radial-gradient(circle at 82% 84%, rgb(0 0 0 / 0.045), transparent 54%),
            url("/system/images/backgrounds/subtle-green-marble-dark.webp");
        --rr-app-background-size: cover, cover, 1024px 1024px;
    }

    html[data-background-style="water"] {
        --rr-app-background-image:
            radial-gradient(circle at 18% 12%, rgb(255 255 255 / 0.025), transparent 48%),
            radial-gradient(circle at 82% 84%, rgb(0 0 0 / 0.035), transparent 54%),
            url("/system/images/backgrounds/subtle-water-dark.webp");
        --rr-app-background-repeat: no-repeat, no-repeat, no-repeat;
        --rr-app-background-size: cover, cover, cover;
    }
}

@font-face {
    font-family: "Quintessential";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/system/fonts/quintessential-v24-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Quintessential";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/system/fonts/quintessential-v24-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    height: 100%;
    background-color: var(--rr-status-area-color);
    background-image: var(--rr-app-background-image);
    background-position: center;
    background-repeat: var(--rr-app-background-repeat);
    background-size: var(--rr-app-background-size);
    font-family: var(--rr-font-family-system);
    font-size: 100%;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    height: 100%;
    margin: 0;
    background: transparent;
    color: var(--rr-text-color);
    font-family: inherit;
    font-size: var(--rr-text-base);
    font-weight: var(--rr-weight-body);
    line-height: var(--rr-line-normal);
    overflow: hidden;
}

body:has(.ems-public-page) {
    height: auto;
    overflow: auto;
}

.desktop-window-titlebar {
    display: none;
}

@media (display-mode: window-controls-overlay) {
    .desktop-window-titlebar {
        position: fixed;
        top: env(titlebar-area-y, 0);
        left: env(titlebar-area-x, 0);
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        width: env(titlebar-area-width, 100%);
        height: env(titlebar-area-height, 32px);
        padding: 0 12px;
        overflow: hidden;
        background: var(--rr-main-color);
        color: #fff;
        font-size: var(--rr-text-sm);
        font-weight: var(--rr-weight-semibold);
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
        app-region: drag;
        -webkit-app-region: drag;
    }

    .is-desktop-device .app-header {
        min-height: calc(64px + env(titlebar-area-height, 32px));
        padding-top: calc(8px + env(titlebar-area-height, 32px));
    }
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

label:has(input[type="checkbox"]),
label:has(input[type="radio"]),
input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
    font-size: var(--rr-input-font-size);
    min-height: 28px;
    padding: 2px 4px 4px;
    border: 1px solid var(--color-border-strong);
    border-radius: 4px;
    background: var(--color-surface);
    color: var(--rr-text-color);
    font-weight: var(--rr-input-font-weight);
    line-height: var(--rr-line-normal);
}

label {
    color: var(--color-text-muted);
    font-size: var(--rr-field-prompt-font-size);
    font-weight: var(--rr-weight-label);
    line-height: var(--rr-line-normal);
}

strong,
b {
    font-weight: var(--rr-weight-emphasis);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-placeholder);
    font-size: var(--rr-input-font-size);
    line-height: var(--rr-line-normal);
    opacity: 1;
}

.rr-title-page {
    font-size: var(--rr-text-3xl);
    font-weight: var(--rr-weight-heading);
    line-height: var(--rr-line-tight);
}

.rr-title-section {
    font-size: var(--rr-text-xl);
    font-weight: var(--rr-weight-heading);
    line-height: var(--rr-line-tight);
}

.rr-title-card {
    font-size: var(--rr-text-lg);
    font-weight: var(--rr-weight-heading);
    line-height: var(--rr-line-tight);
}

.rr-text-body {
    font-size: var(--rr-text-base);
    line-height: var(--rr-line-normal);
}

.rr-text-small {
    font-size: var(--rr-text-sm);
    line-height: var(--rr-line-normal);
}

.rr-text-caption {
    font-size: var(--rr-text-xs);
    line-height: var(--rr-line-normal);
}

a {
    color: inherit;
}

.app-shell {
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    background: transparent;
}

.environment-indicator {
    position: fixed;
    top: 1px;
    left: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 16px;
    height: 64px;
    padding: 0;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-size: 0.74rem;
    font-weight: var(--rr-weight-regular);
    line-height: 1.1;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 10px;
    min-height: 64px;
    padding: 8px 14px 8px 24px;
    background: var(--rr-surface-color);
    border-bottom: 0;
    font-family: var(--rr-page-heading-font);
}

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

.header-back-button,
.header-reload-button {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rr-main-color);
    cursor: pointer;
}

.is-mobile-device .header-navigation-actions {
    gap: 8px;
}

.is-mobile-device .header-back-button {
    margin: 0;
}

.header-back-button {
    transform: translateX(-8px);
}

.is-mobile-device .header-reload-button {
    margin: 0 24px 0 0;
}

.header-back-button:disabled {
    color: var(--color-text-subtle);
    cursor: default;
    opacity: 0.45;
}

.header-back-button svg,
.header-reload-button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.care-recipient-picker {
    position: relative;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    margin-left: 20px;
}

.current-care-recipient {
    display: none;
    align-items: center;
    min-width: 0;
    gap: 8px;
    color: var(--rr-main-color);
    font-family: var(--rr-page-heading-font);
    font-size: var(--rr-text-3xl);
    font-weight: var(--rr-weight-emphasis);
    text-decoration: none;
}

.current-care-recipient.has-care-recipient {
    display: inline-flex;
}

.current-care-recipient:empty {
    display: none;
}

.current-care-recipient img {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--rr-border-color);
    border-radius: 4px;
    object-fit: cover;
}

.current-care-recipient span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-care-recipient::after {
    content: "";
    flex: 0 0 auto;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid currentColor;
}

.care-recipient-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 80;
    width: min(320px, calc(100vw - 24px));
    max-height: min(420px, calc(100vh - 96px));
    overflow: auto;
    padding: 6px;
    background: var(--color-surface);
    border: 1px solid var(--rr-border-color);
    border-radius: 6px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
}

.care-recipient-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0;
    color: var(--rr-text-color);
    font-size: var(--rr-text-base);
    font-weight: var(--rr-weight-emphasis);
    line-height: var(--rr-line-tight);
    text-decoration: none;
}

.care-recipient-menu-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    gap: 4px;
    padding: 0;
    border-radius: 4px;
    background: var(--care-recipient-menu-background, transparent);
}

.care-recipient-menu-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.care-recipient-menu-row:hover,
.care-recipient-menu-row:focus-within,
.care-recipient-menu-row:has(.care-recipient-menu-item.is-current) {
    background: var(--care-recipient-menu-background, var(--rr-background-color));
    color: var(--rr-main-color);
}

.care-recipient-menu-row:hover .care-recipient-menu-item,
.care-recipient-menu-row:focus-within .care-recipient-menu-item,
.care-recipient-menu-row:has(.care-recipient-menu-item.is-current) .care-recipient-menu-item {
    color: var(--rr-main-color);
}

.care-recipient-menu-item img,
.care-recipient-menu-item svg,
.care-recipient-menu-edit svg {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid var(--rr-border-color);
    border-radius: 4px;
    object-fit: cover;
}

.care-recipient-menu-item svg,
.care-recipient-menu-edit svg {
    display: block;
    padding: 7px;
    color: var(--rr-main-color);
    background: #fff;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.care-recipient-menu-edit {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--rr-main-color);
    border-radius: 4px;
}

.care-recipient-menu-edit svg {
    background: transparent;
}

.care-recipient-menu-separator {
    height: 1px;
    margin: 6px 4px;
    background: var(--rr-border-color);
}

.sync-status {
    position: absolute;
    top: 50%;
    left: calc(100% + 24px);
    z-index: 50;
    display: grid;
    place-items: center;
    width: 36px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    color: var(--rr-main-color);
    pointer-events: none;
    transform: translateY(-50%);
}

.sync-status svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sync-status-active .sync-arrow-up {
    animation: rr-sync-arrow-up 0.6s ease-in-out infinite;
}

.sync-status-active .sync-arrow-down {
    animation: rr-sync-arrow-down 0.6s ease-in-out infinite;
}

@keyframes rr-sync-arrow-up {
    0%, 100% {
        transform: translateY(3px);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes rr-sync-arrow-down {
    0%, 100% {
        transform: translateY(-3px);
    }

    50% {
        transform: translateY(3px);
    }
}

.sync-status-complete {
    color: var(--color-success);
}

.sync-status-error {
    color: var(--color-danger);
}

.brand {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    margin-right: 4px;
    color: var(--rr-main-color);
    text-decoration: none;
}

.brand img {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    object-fit: contain;
    transform: scale(1.27);
    transform-origin: center;
}

.brand span {
    display: grid;
    min-width: 0;
}

.brand strong {
    overflow: hidden;
    font-size: 2.24rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icon-button,
.account-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--rr-border-color);
    background: var(--rr-surface-color);
    color: var(--rr-main-color);
    cursor: pointer;
}

.icon-button {
    display: inline-grid;
    place-content: center;
    gap: 4px;
    padding: 8px;
    border-radius: 8px;
    border-color: var(--rr-main-color);
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.menu-toggle-icon {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-button.menu-toggle {
    border-color: transparent;
    background: transparent;
    color: var(--rr-main-color);
}

.account-toggle {
    display: inline-grid;
    place-items: center;
    padding: 8px;
    border-radius: 8px;
    border-color: var(--rr-main-color);
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.account-avatar {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    color: var(--color-surface);
}

.account-avatar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 8px;
    height: 8px;
    border: 3px solid currentColor;
    border-radius: 50%;
    transform: translateX(-50%);
}

.account-avatar::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 18px;
    height: 7px;
    border: 3px solid currentColor;
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    transform: translateX(-50%);
}

.app-tab-nav {
    z-index: 18;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    max-width: 1080px;
    margin: -1px auto 0;
    padding: 6px 10px;
    border-top: 1px solid var(--rr-border-color);
    border-bottom: 1px solid var(--rr-border-color);
    background: var(--rr-surface-color);
    box-shadow: var(--shadow-sm);
}

.app-tab-item {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 58px;
    padding: 5px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--rr-main-color);
    font: inherit;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.app-tab-item:hover,
.app-tab-item:focus {
    background: var(--color-primary-soft);
    outline: none;
}

.app-tab-item img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.app-tab-label {
    overflow: hidden;
    max-width: 100%;
    color: var(--rr-main-color);
    font-size: 0.82rem;
    font-weight: var(--rr-weight-emphasis);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-tab-label-short {
    display: none;
}

.app-tab-more-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    color: var(--rr-main-color);
}

.app-tab-more-icon span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--color-overlay);
}

.side-menu {
    position: fixed;
    z-index: 100;
    display: grid;
    align-content: start;
    gap: 0;
    background: var(--rr-surface-color);
    border: 1px solid var(--rr-border-color);
    box-shadow: var(--rr-shadow);
}

.side-menu {
    top: 72px;
    right: 10px;
    width: min(300px, calc(100vw - 20px));
    max-height: calc(100vh - 84px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 8px;
}

.side-menu a,
.side-menu button,
.account-user {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--rr-text-color);
    font-weight: var(--rr-weight-regular);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.account-user {
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.menu-form {
    margin: 0;
}

.side-menu-language {
    display: grid;
    gap: 6px;
    width: 100%;
    min-height: 48px;
    padding: 8px;
    color: var(--rr-text-color);
}

.side-menu-language .language-selector summary {
    min-height: 48px;
    background: var(--rr-main-color);
    color: var(--color-surface);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.side-menu .side-menu-english-option.is-current {
    background: var(--color-primary-soft);
    font-weight: var(--rr-weight-emphasis);
}

.language-selector {
    position: relative;
    width: 100%;
}

.language-selector summary {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 28px 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--rr-text-color);
    font: inherit;
    cursor: pointer;
    list-style: none;
}

.language-selector summary::-webkit-details-marker {
    display: none;
}

.language-selector summary::after {
    content: "";
    position: absolute;
    right: 10px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.language-selector[open] summary::after {
    transform: translateY(2px) rotate(225deg);
}

.language-selector-menu {
    position: absolute;
    z-index: 1200;
    top: 100%;
    left: 0;
    display: grid;
    width: max(100%, 280px);
    max-height: min(60vh, 440px);
    overflow-y: auto;
    border: 1px solid var(--rr-border-color);
    border-radius: 7px;
    background: var(--color-surface);
    box-shadow: var(--rr-shadow);
}

.language-selector-option {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: var(--rr-text-color);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.side-menu .language-selector-option {
    display: grid;
}

.language-selector-option > span {
    display: block;
}

.language-selector-option:hover,
.language-selector-option:focus,
.language-selector-option.is-current {
    background: var(--color-primary-soft);
    outline: none;
}

.language-selector-option.is-english .language-selector-language {
    font-weight: 700;
}

.language-selector-english-name {
    padding-top: 0;
    font-size: 0.8em;
}

.menu-separator {
    height: 1px;
    background: var(--rr-border-color);
}

.side-menu > :first-child {
    border-radius: 7px 7px 0 0;
}

.side-menu > a:first-child {
    border-radius: 7px 7px 0 0;
}

.side-menu > :last-child {
    border-radius: 0 0 7px 7px;
}

.side-menu > :last-child button {
    border-radius: 0 0 7px 7px;
}

.side-menu a:hover,
.side-menu a:focus,
.side-menu button:hover,
.side-menu button:focus {
    background: var(--rr-background-color);
    outline: none;
}

.side-menu button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.side-menu .stop-impersonating-button {
    font-weight: var(--rr-weight-emphasis);
}

.rendering-mode-menu {
    display: grid;
    padding: 6px 0;
}

.side-menu-section-header {
    padding: 8px 12px 4px;
    color: var(--rr-main-color);
    font-size: 0.82rem;
    font-weight: var(--rr-weight-emphasis);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.side-menu .rendering-mode-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px;
    min-height: 38px;
    padding: 6px 12px 6px 24px;
}

.rendering-mode-check {
    visibility: hidden;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
}

.rendering-mode-option[aria-checked="true"] .rendering-mode-check {
    visibility: visible;
}

.rendering-mode-option[aria-checked="true"] {
    font-weight: var(--rr-weight-emphasis);
}

.rendering-mode-toast {
    position: fixed;
    left: 50%;
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
    z-index: 2000;
    max-width: calc(100vw - 32px);
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--rr-main-color);
    color: #fff;
    font-weight: var(--rr-weight-emphasis);
    box-shadow: var(--rr-shadow);
    transform: translateX(-50%);
}

.floating-action-layer {
    position: fixed;
    inset: 0;
    z-index: 60;
    overflow: visible;
    pointer-events: none;
}

.floating-action-layer .add-new,
.floating-action-layer .care-recipient-add-button {
    pointer-events: auto;
}

body:is(.rx-editor-open, .provider-editor-open, .document-editor-open, .rr-view-modal-open) :is(.floating-action-layer, .floating-add-button),
body:has(.app-dialog-backdrop:not([hidden]), .provider-detail-modal:not([hidden]), .document-detail-modal:not([hidden]), .rx-detail-modal:not([hidden]), .document-preview-overlay:not([hidden]), .rr-today-preview-overlay:not([hidden]), .notes-folder-modal-overlay:not([hidden]), .notes-app.is-note-editor-open) :is(.floating-action-layer, .floating-add-button) {
    display: none;
    pointer-events: none;
}

html[data-rendering-mode="desktop"] body {
    min-width: 1280px;
}

html[data-rendering-mode="desktop"][data-rendering-device="iphone"],
html[data-rendering-mode="desktop"][data-rendering-device="iphone"] body,
html[data-rendering-mode="desktop"][data-rendering-device="iphone"] .app-shell {
    height: 100lvh;
    min-height: 100lvh;
}

html[data-rendering-mode="desktop"][data-rendering-device="iphone"][data-rendering-orientation="landscape"] .page-panel,
html[data-rendering-mode="desktop"][data-rendering-device="iphone"][data-rendering-orientation="landscape"] .app-header {
    border-right: 1px solid var(--rr-main-color);
}

html[data-rendering-mode="desktop"] .app-shell {
    padding-top: var(--rr-rendering-safe-top, env(safe-area-inset-top));
    padding-right: var(--rr-rendering-safe-right, env(safe-area-inset-right));
    padding-bottom: var(--rr-rendering-safe-bottom, env(safe-area-inset-bottom));
    padding-left: var(--rr-rendering-safe-left, env(safe-area-inset-left));
}

html[data-rendering-mode="desktop"] .environment-indicator {
    top: max(1px, var(--rr-rendering-safe-top, env(safe-area-inset-top)));
    left: var(--rr-rendering-safe-left, env(safe-area-inset-left));
}

html[data-rendering-mode="desktop"] .side-menu {
    top: calc(72px + var(--rr-rendering-safe-top, env(safe-area-inset-top)));
    right: calc(10px + var(--rr-rendering-safe-right, env(safe-area-inset-right)));
    max-height: calc(100vh - 84px - var(--rr-rendering-safe-top, env(safe-area-inset-top)) - var(--rr-rendering-safe-bottom, env(safe-area-inset-bottom)));
}

html[data-rendering-mode="tablet"] body {
    min-width: 768px;
}

html[data-rendering-mode="phone"] body {
    width: min(390px, 100%);
    margin-right: auto;
    margin-left: auto;
}

.stop-impersonating-prompt {
    color: var(--color-danger);
}

.stop-impersonating-name {
    color: var(--rr-main-color);
}

.desktop-layout-row {
    display: flex;
    min-width: 0;
    min-height: 0;
    width: min(1280px, 100%);
    margin: 0 auto;
}

.desktop-care-nav {
    display: none;
}

.desktop-care-nav-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 46px;
    margin-right: 0;
    margin-left: 0;
    padding: 4px 10px;
    border-radius: 8px;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.15;
    text-decoration: none;
}

.desktop-care-nav-item:hover,
.desktop-care-nav-item:focus,
.desktop-care-nav-item.is-active {
    background: var(--color-primary-soft);
    outline: none;
}

.desktop-care-nav-item img {
    display: block;
    width: 56px;
    height: 30px;
    object-fit: contain;
}

.desktop-care-nav-item span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.desktop-administration-nav-item {
    border-top: 1px solid var(--rr-border-color);
    border-radius: 0;
    margin-top: 6px;
    padding-top: 10px;
}

.app-main {
    display: flex;
    min-width: 0;
    width: min(1080px, 100%);
    min-height: 0;
    margin: 0 auto;
    padding: 0;
}

.page-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 24px;
    background: var(--rr-page-panel-background);
    border: 1px solid var(--rr-border-color);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: var(--rr-shadow);
    overflow: hidden;
}

body[data-page="home"] .page-panel {
    background: var(--rr-page-panel-background);
}

body[data-page="home"] .page-panel,
body[data-page="care-team-dashboard"] .page-panel {
    padding-right: 0;
    padding-left: 0;
}

body[data-page="home"] .page-title-row,
body[data-page="care-team-dashboard"] .page-title-row {
    padding-right: 24px;
    padding-left: 24px;
}

.page-content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
	padding: 0 0 16px;
    overflow-y: auto;
}

.feature-placeholder {
    display: grid;
    min-height: 220px;
    place-items: center;
    padding: 24px;
    color: var(--rr-muted-color);
    text-align: center;
}

.feature-placeholder p {
    max-width: 36rem;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.5;
}

.page-icon {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.page-title-row {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

body[data-page="pharmacies"] .page-title-row {
    margin-bottom: 16px;
}

body[data-page="rr-companion"] .page-title-row {
    margin-bottom: 16px;
}

h1 {
    min-width: 0;
    margin: 0;
    color: var(--rr-main-color);
    font-family: var(--rr-page-heading-font);
    font-size: var(--rr-text-3xl);
    line-height: var(--rr-line-tight);
}

.is-desktop-device h1 {
}

.is-desktop-device .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
}

.is-desktop-device .app-tab-nav {
    display: none;
}

.is-desktop-device .desktop-layout-row {
    grid-row: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.is-desktop-device .desktop-care-nav {
    flex: 0 0 210px;
    display: grid;
    align-content: start;
    gap: 4px;
    min-height: 0;
    height: 100%;
    padding: 14px 0;
    border: 1px solid var(--rr-border-color);
    border-top: 0;
    border-left: 0;
    border-radius: 0;
    background: var(--rr-surface-color);
    box-shadow: var(--rr-shadow);
    overflow-y: auto;
}

.is-desktop-device .app-main {
    flex: 1 1 auto;
    width: auto;
    height: 100%;
    margin: 0;
    border-top: 1px solid var(--rr-border-color);
    box-shadow: var(--rr-shadow);
}

.is-desktop-device .page-panel {
    border-top: 1px solid var(--rr-border-color);
    border-right: 0;
    border-radius: 0;
}

.is-desktop-device .page-title-row {
    padding-top: 32px;
}

.is-desktop-device body[data-page="home"] .page-panel,
.is-desktop-device body[data-page="care-team-dashboard"] .page-panel {
    padding-right: 24px;
    padding-left: 24px;
}

.is-desktop-device body[data-page="home"] .page-title-row,
.is-desktop-device body[data-page="care-team-dashboard"] .page-title-row {
    padding-right: 0;
    padding-left: 0;
}

.is-desktop-device body[data-page="home"] .page-content {
    padding-top: 32px;
}

.is-desktop-device body[data-page="rx-manager"] .page-title-row,
.is-desktop-device body[data-page="providers"] .page-title-row,
.is-desktop-device body[data-page="pharmacies"] .page-title-row,
.is-desktop-device body[data-page="contacts"] .page-title-row {
    width: min(820px, 100%);
}

.is-desktop-device body[data-page="notes"] .page-title-row,
.is-desktop-device body[data-page="ideas-tbd"] .page-title-row {
    width: min(1120px, 100%);
}

.is-desktop-device body[data-page="schedule"] .page-title-row,
.is-desktop-device body[data-page="diary"] .page-title-row {
    position: relative;
    width: min(720px, 100%);
}

.is-desktop-device body[data-page="home"] .page-title-row,
.is-desktop-device body[data-page="care-team-dashboard"] .page-title-row {
    width: min(780px, 100%);
}

.is-desktop-device body[data-page="schedule"] .schedule-title-search,
.is-desktop-device body[data-page="diary"] .diary-title-search {
    position: absolute;
    left: 50%;
    width: 210px;
    margin-left: 0;
    transform: translateX(-50%);
}

.schedule-title-view-actions,
.diary-title-view-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.diary-view-button {
    min-width: 86px;
}

.schedule-view-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 7px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: #fff;
    color: var(--rr-main-color);
    cursor: pointer;
}

.schedule-view-button.is-active {
    background: var(--rr-main-color);
    color: #fff;
}

.schedule-view-button svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.schedule-view-button.is-active svg {
    stroke-width: 2;
}

.is-mobile-device .schedule-view-button svg {
    transform: translateX(-4px);
}

.schedule-view-button svg circle {
    fill: currentColor;
    stroke: none;
}

.is-desktop-device body[data-page="schedule"] .schedule-title-view-actions,
.is-desktop-device body[data-page="diary"] .diary-title-view-actions {
    margin-left: auto;
}

.page-title-action {
    flex: 0 0 auto;
    margin-left: auto;
}

.page-title-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.page-title-actions .page-title-action {
    margin-left: 0;
}

.notes-title-search,
.schedule-title-search,
.diary-title-search {
    width: min(300px, 38vw);
}

.notes-title-search input,
.schedule-title-search input,
.diary-title-search input,
.contacts-list-search input {
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--rr-text-color);
}

.contacts-list-toolbar {
    display: flex;
    width: min(820px, 100%);
    margin: 0 0 12px;
}

.contacts-list-search-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.contacts-list-filters {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 8px 16px;
    margin: 0;
    padding: 0;
    border: 0;
}

.contacts-list-filters label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: var(--rr-weight-regular);
    cursor: pointer;
}

.contacts-list-filters input[type="checkbox"] {
    flex: 0 0 20.8px;
    width: 20.8px;
    height: 20.8px;
    margin: 0;
}

.notes-list-toolbar {
    display: flex;
    width: min(1120px, 100%);
    margin: 0 0 12px;
}

.notes-list-toolbar .notes-title-search {
    width: 100%;
    margin-left: 0;
}

.contacts-list-search {
    flex: 0 1 300px;
    min-width: 120px;
}

@media (max-width: 520px) {
    .contacts-list-search-controls {
        gap: 6px;
    }

    .contacts-list-search {
        flex-basis: 76px;
        min-width: 76px;
    }

    .contacts-list-search input {
        padding-right: 5px;
        padding-left: 5px;
        font-size: 0.75rem;
    }

    .contacts-list-filters {
        justify-content: space-between;
        gap: 4px;
    }

    .contacts-list-filters label {
        gap: 2px;
        font-size: 0.75rem;
        line-height: 1.1;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.markdown-content {
    max-width: 72ch;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: var(--rr-main-color);
    line-height: 1.2;
}

.markdown-content h1 {
    margin: 0 0 18px;
}

.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 24px 0 10px;
}

.markdown-content p,
.markdown-content ul,
.markdown-content ol {
    margin: 0 0 16px;
}

.markdown-content li {
    margin: 4px 0;
}

.markdown-content a {
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
}

body[data-page="about"] .page-content,
body[data-page="messaging-terms"] .page-content,
body[data-page="privacy-policy"] .page-content,
body[data-page="terms-of-service"] .page-content {
    display: flex;
    align-items: flex-start;
    overflow: hidden;
}

body[data-page="about"] .markdown-content,
body[data-page="messaging-terms"] .markdown-content,
body[data-page="privacy-policy"] .markdown-content,
body[data-page="terms-of-service"] .markdown-content {
    position: relative;
    width: min(72ch, 100%);
    min-height: 0;
    max-height: 100%;
    padding: 16px;
    overflow-y: auto;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.content-workarea-close {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    float: right;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0 0 8px 12px;
    padding: 7px;
    border: 1px solid var(--rr-border-color);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--rr-main-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.content-workarea-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.5;
}

.content-workarea-close + * {
    clear: both;
}

body[data-page="bugs-suggestions-and-support"] .page-content {
    display: flex;
    overflow: hidden;
}

.bugs-suggestions-workarea {
    position: relative;
    display: flex;
    flex: 0 1 760px;
    flex-direction: column;
    width: min(760px, 100%);
    max-width: 100%;
    height: fit-content;
    max-height: 100%;
    min-height: 0;
    padding: 10px;
    overflow: hidden;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--rr-surface-color);
    box-shadow: var(--shadow-sm);
}

.bugs-instructions-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 6px;
    border: 1px solid var(--rr-main-color);
    border-radius: 50%;
    background: var(--rr-main-color);
    color: #FFFFFF;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.bugs-instructions-toggle span {
    display: block;
}

.bugs-suggestions-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    gap: 4px;
    padding-top: 0;
    overflow: hidden;
}

.bugs-suggestions-scroll-region {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    gap: 4px;
    padding-right: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.bugs-suggestions-warning {
    width: calc(100% - 44px);
    max-width: 100%;
    margin: 0 0 16px;
    color: var(--color-text-muted);
    font-size: var(--rr-text-sm);
}

.bugs-suggestions-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.bugs-suggestions-contact-row {
    grid-template-columns: max-content minmax(16rem, 24rem);
    justify-content: start;
    gap: 12px;
}

.bugs-required-label {
    color: var(--color-danger);
}

.bugs-suggestions-form .form-row > label,
.bugs-suggestions-form .form-row > .field-label {
    margin-top: 2px;
    font-size: 0.8rem;
}

.bugs-suggestions-form input,
.bugs-suggestions-form select,
.bugs-suggestions-form textarea {
    width: 100%;
}

.bugs-suggestions-form #bugs-field-report-type {
    width: max-content;
    max-width: 100%;
}

.bugs-suggestions-form textarea {
    line-height: 1.25;
    resize: vertical;
}

body[data-page="bugs-suggestions-and-support"] .bugs-screenshot-controls {
    grid-template-columns: minmax(110px, 130px) minmax(0, 1fr);
    gap: 8px;
    width: min(100%, 430px);
}

body[data-page="bugs-suggestions-and-support"] .bugs-screenshot-controls .care-recipient-photo-dropzone {
    width: 100%;
    height: 130px;
    padding: 8px;
}

body[data-page="bugs-suggestions-and-support"] .bugs-screenshot-controls .care-recipient-photo-actions {
    align-items: flex-start;
    min-height: 130px;
    gap: 4px;
}

body[data-page="bugs-suggestions-and-support"] .bugs-screenshot-controls .care-recipient-photo-actions button {
    width: max-content;
    max-width: 100%;
    min-height: 34px;
    padding: 3px 7px;
    font-size: 0.78rem;
}

.bugs-suggestions-actions {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    padding-top: 6px;
}

.bugs-instructions-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: min(80vh, 720px);
}

.bugs-instructions-dialog > h2 {
    padding-right: 58px;
}

.bugs-instructions-dialog .markdown-content {
    width: 100%;
    min-height: 0;
    overflow-y: auto;
    background: #FFFFFF;
}

.bugs-instructions-close {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 7px;
    border: 1px solid var(--rr-border-color);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--rr-main-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.bugs-instructions-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.5;
}

@media (max-width: 600px) {
    .bugs-suggestions-workarea {
        padding: 8px;
    }

    .bugs-suggestions-form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .bugs-suggestions-contact-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 160px));
    grid-auto-rows: 124px;
    align-items: stretch;
    gap: 10px;
}

.home-tile {
    position: relative;
    display: grid;
    grid-template-rows: 64px minmax(0, 1fr);
    align-items: center;
    align-content: stretch;
    justify-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 0;
    height: 124px;
    padding: 10px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    color: inherit;
    text-align: center;
    text-decoration: none;
}

.mobile-administration-tile {
    display: none;
}

.care-team-btg-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.care-team-dashboard-tile-grid {
    justify-content: center;
}

.sortable-tile {
    cursor: grab;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.sortable-tiles-reorder-mode .sortable-tile,
.sortable-tile.is-dragging {
    touch-action: none;
}

.tile-drag-handle {
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    grid-template-columns: repeat(2, 4px);
    grid-template-rows: repeat(3, 4px);
    gap: 3px;
    width: 25px;
    height: 31px;
    place-content: center;
    border: 1px solid var(--rr-border-color);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    cursor: grab;
    opacity: 0;
    transition: opacity 0.14s ease;
}

.tile-drag-handle span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--rr-main-color);
}

.sortable-tile:hover .tile-drag-handle,
.sortable-tile:focus .tile-drag-handle,
.sortable-tiles-reorder-mode .tile-drag-handle {
    opacity: 1;
}

.is-mobile-device .sortable-tile .tile-drag-handle {
    opacity: 0;
    pointer-events: none;
}

.is-mobile-device .sortable-tiles-reorder-mode .tile-drag-handle {
    opacity: 1;
}

.tile-reorder-done {
    position: sticky;
    top: 8px;
    z-index: 10;
    justify-self: end;
    min-height: 36px;
    padding: 7px 14px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: var(--rr-main-color);
    color: #fff;
    font: inherit;
    font-weight: var(--rr-weight-emphasis);
}

.sortable-tile.is-dragging {
    opacity: 0.55;
    outline: 3px solid var(--rr-main-color);
    outline-offset: 2px;
    transform: scale(0.98);
}

.sortable-tiles-reorder-mode .sortable-tile:not(.is-dragging) {
    animation: tile-jiggle 0.14s infinite alternate ease-in-out;
}

.sortable-tiles-reorder-mode .sortable-tile:nth-child(even):not(.is-dragging) {
    animation-direction: alternate-reverse;
}

body.sortable-tile-sort-active,
body.sortable-tile-sort-active * {
    -webkit-user-select: none;
    user-select: none;
}

@keyframes tile-jiggle {
    from {
        transform: rotate(-2.4deg) translateX(-1px);
    }

    to {
        transform: rotate(2.4deg) translateX(1px);
    }
}

.view-logs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.view-logs-table-wrap {
    max-height: min(62vh, 640px);
    overflow: auto;
    background: #fff;
}

.view-logs-table {
    width: 100%;
    border-collapse: collapse;
}

.view-logs-table th,
.view-logs-table td {
    padding: 4px;
    border: 1px solid var(--rr-border-color);
    text-align: left;
    vertical-align: top;
}

.view-logs-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--rr-main-color);
    color: #fff;
}

.view-logs-table th:first-child,
.view-logs-table td:first-child {
    width: 20ch;
    min-width: 20ch;
}

.view-logs-table-audit th:nth-child(3),
.view-logs-table-audit td:nth-child(3) {
    width: 25ch;
    min-width: 25ch;
}

.view-logs-table tbody tr:nth-child(odd) {
    background: #fff;
}

.view-logs-table tbody tr:nth-child(even) {
    background: var(--color-primary-soft);
}

.care-central-title-search {
    width: min(320px, 40vw);
    margin-top: 0;
    margin-bottom: 8px;
}

.care-central-title-search input {
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--rr-text-color);
}

.mobile-nav-settings {
    display: grid;
    gap: 12px;
    margin: 16px 0 0;
    padding: 14px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
}

.mobile-nav-settings legend {
    padding: 0 6px;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-label);
}

.mobile-nav-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.mobile-nav-selected-wrap h2,
.mobile-nav-choice-wrap h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.mobile-nav-selected-list,
.mobile-nav-choice-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.mobile-nav-selected-list {
    list-style: none;
    -webkit-user-select: none;
    user-select: none;
}

.mobile-nav-selected-item,
.mobile-nav-choice {
    display: grid;
    grid-template-columns: auto 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    height: 46px;
    min-height: 46px;
    padding: 6px 8px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    -webkit-user-select: none;
    user-select: none;
}

.mobile-nav-selected-item > img,
.mobile-nav-choice > img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.mobile-nav-choice {
    cursor: pointer;
}

.mobile-nav-choice.is-disabled {
    opacity: 0.58;
}

.mobile-nav-selected-item span,
.mobile-nav-choice span {
    min-width: 0;
    overflow: hidden;
    font-weight: var(--rr-weight-emphasis);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav-drag-handle {
    display: grid;
    place-content: center;
    width: 34px;
    height: 34px;
    padding: 5px;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    cursor: grab;
    touch-action: none;
}

.mobile-nav-drag-handle:active {
    cursor: grabbing;
}

.mobile-nav-drag-handle svg {
    width: 16px;
    height: 24px;
    fill: currentColor;
}

.mobile-nav-selected-item.is-dragging {
    opacity: 0.5;
    outline: 3px solid var(--rr-main-color);
    outline-offset: -3px;
    background: var(--color-primary-soft);
}

.mobile-nav-selected-marker {
    min-height: 46px;
    border: 3px dashed var(--rr-main-color);
    border-radius: 8px;
    background: var(--color-primary-soft);
}

body.mobile-nav-sort-active,
body.mobile-nav-sort-active * {
    -webkit-user-select: none;
    user-select: none;
}

@media (max-width: 720px) {
    .mobile-nav-settings-grid {
        grid-template-columns: 1fr;
    }
}

.care-central-search-results {
    width: min(780px, 100%);
    margin-bottom: 14px;
}

.care-central-search-list {
    display: grid;
    gap: 8px;
}

.care-central-search-result,
.care-central-search-empty {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    color: inherit;
    text-decoration: none;
}

.care-central-search-result:hover,
.care-central-search-result:focus {
    border-color: var(--rr-main-color);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.care-central-search-result-type {
    color: var(--rr-main-color);
    font-size: 0.78rem;
    font-weight: var(--rr-weight-emphasis);
    text-transform: uppercase;
}

.care-central-search-result span:last-child,
.care-central-search-empty {
    color: var(--rr-muted-color);
    font-size: 0.92rem;
}

.care-central-login-sticky {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--rr-main-color);
    color: #fff;
    font-weight: var(--rr-weight-emphasis);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.24);
}

.care-central-login-sticky span {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-left: 0;
    border-radius: 2px;
}

.care-central-login-sticky span::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 7px;
    width: 14px;
    height: 2px;
    background: currentColor;
}

.care-central-login-sticky span::after {
    content: "";
    position: absolute;
    left: -1px;
    top: 3px;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}

.home-tile:hover,
.home-tile:focus {
    background: var(--rr-background-color);
    outline: 3px solid var(--color-primary-soft);
    outline-offset: 2px;
}

.care-recipient-tile {
    position: relative;
}

.care-recipient-list {
    display: grid;
    gap: 8px;
}

.care-recipient-add-button {
    display: inline-grid;
    place-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    text-decoration: none;
}

.care-recipient-add-button svg {
    display: block;
    width: 36px;
    height: 36px;
    padding: 9px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.care-recipient-add-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.care-recipient-tile-main {
    display: grid;
    grid-row: 1 / -1;
    grid-template-rows: 64px minmax(0, 1fr);
    align-items: center;
    align-content: stretch;
    justify-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.tile-edit-button {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--rr-main-color);
    border-radius: 4px;
    background: var(--color-surface);
    color: var(--rr-main-color);
}

.tile-edit-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-tile img {
    display: block;
    max-width: 96px;
    max-height: 64px;
    object-fit: contain;
}

.care-central-tile-grid,
.care-team-dashboard-tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(158px, 192px));
    grid-auto-rows: 149px;
}

.care-central-tile,
.care-team-dashboard-tile {
    grid-template-rows: 77px minmax(0, 1fr);
    height: 149px;
    padding: 12px;
}

.care-central-tile > img,
.care-team-dashboard-tile > img:not(.care-team-btg-badge) {
    max-width: 116px;
    max-height: 77px;
}

.home-tile img.care-recipient-tile-photo {
    width: 96px;
    height: 64px;
    border-radius: 4px;
    object-fit: contain;
}

body[data-page="care-recipients"] .care-recipient-list .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(165px, 200px));
    grid-auto-rows: 155px;
}

body[data-page="care-recipients"] .care-recipient-tile {
    height: 155px;
}

body[data-page="care-recipients"] .care-recipient-tile-main {
    grid-template-rows: 100px minmax(0, 1fr);
}

body[data-page="care-recipients"] .home-tile img.care-recipient-tile-photo {
    width: 150px;
    height: 100px;
}

.tile-label {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    color: var(--rr-main-color);
    font-family: var(--rr-page-heading-font);
    font-size: 0.96rem;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.12;
    text-decoration: none;
    overflow-wrap: anywhere;
    text-wrap: balance;
    hyphens: auto;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.care-central-tile .tile-label,
.care-team-dashboard-tile .tile-label {
    font-size: 1.15rem;
}

.tile-label sub {
    font-size: 0.72em;
    line-height: 0;
}

.rx-manager-app {
    display: grid;
    gap: 14px;
    width: min(820px, 100%);
}

.rx-add-button,
.rx-voice-actions .primary-button,
.rx-voice-actions .secondary-button,
.rx-voice-review-actions .primary-button,
.rx-voice-review-actions .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.rx-button-icon,
.rx-add-button svg,
.row-icon-button svg {
    display: block;
    width: 20px;
    height: 20px;
}

.rx-button-icon svg,
.rx-add-button svg,
.row-icon-button svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rx-list {
    display: grid;
}

.rx-list-empty {
    border: 0;
}

.rx-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    grid-template-rows: auto auto;
    padding: 0 0 4px;
    border-bottom: 1px solid var(--color-border-strong);
    background: var(--color-surface);
}

.rx-row:nth-child(even) {
    background: var(--rr-background-color);
}

.rx-row:last-child {
    border-bottom: 0;
}

.rx-row:hover,
.rx-row:focus-within {
    background: var(--color-primary-soft);
}

body:is([data-page="rx-manager"], [data-page="pharmacies"]) .rx-row {
    margin-bottom: 8px;
}

.is-mobile-device body[data-page="rx-manager"] .rx-row {
    overflow: hidden;
    touch-action: pan-y;
}

.is-mobile-device body[data-page="rx-manager"] .rx-row .rx-card-title {
    grid-column: 1 / -1;
}

.is-mobile-device body[data-page="rx-manager"] .rx-row .rx-delete-button {
    display: none;
}

.is-mobile-device body[data-page="rx-manager"] .rx-row.is-delete-revealed .rx-card-title {
    grid-column: 1;
}

.is-mobile-device body[data-page="rx-manager"] .rx-row.is-delete-revealed .rx-delete-button {
    display: grid;
}

.rx-card {
    display: contents;
    min-width: 0;
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rr-text-color);
    font: inherit;
    text-align: left;
    cursor: default;
}

.rx-card-title {
    display: block;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    padding: 4px 6px;
    background: var(--rr-main-color);
    color: var(--color-surface);
    overflow: hidden;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rx-card-meta,
.rx-empty {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.rx-card-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    padding: 0 6px;
	padding-top: 5px;
    white-space: normal;
}

.rx-card-meta span:not(:last-child)::after {
    content: "|";
    margin: 0 8px;
    color: var(--color-text-subtle);
    font-weight: var(--rr-weight-regular);
}

.rx-card-meta span.rx-summary-break-after::after,
.rx-card-meta span.rx-summary-line-break::after {
    content: "";
    margin: 0;
}

.rx-card-meta .provider-edit-link,
.rx-card-meta .provider-portal-link,
.rx-card-meta .provider-phone-link,
.rx-card-meta .provider-email-link {
    min-height: 28px;
    padding: 3px 10px;
    font-size: 0.9rem;
}

.provider-edit-link,
.provider-portal-link,
.provider-phone-link,
.provider-email-link {
    gap: 6px;
}

#pharmacy-list button {
    margin-right: 6px;
}

#pharmacy-list .rx-card-meta {
    align-items: center;
}

#pharmacy-list .rx-row {
    cursor: pointer;
}

.provider-edit-link svg,
.provider-portal-link svg,
.provider-phone-link svg,
.provider-email-link svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.provider-portal-link:disabled,
.provider-phone-link:disabled,
.provider-email-link:disabled {
    border-color: #E5EAF0;
    background: #F8FAFC;
    color: #B6C0CA;
    cursor: not-allowed;
    opacity: 0.55;
}

.provider-add-button.add-new {
    position: fixed;
    right: 40px;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 30;
    width: 72px;
    height: auto;
    min-height: 72px;
    gap: 0;
    justify-items: center;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
    touch-action: none;
    user-select: none;
}

.provider-add-button.add-new svg {
    width: 72px;
    height: 72px;
    padding: 18px;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    box-shadow: none;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
}

.provider-add-button.add-new span {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
}

.provider-table-wrap {
    width: 100%;
    min-width: 0;
    overflow: auto;
    border: 0;
}

.provider-table-wrap.rx-list-empty {
    border: 0;
}

.provider-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.provider-delete-column {
    width: 48px;
}

.provider-table-record > tr {
    background: var(--color-surface);
}

.provider-table-record:nth-child(even) > .provider-table-actions-row {
    background: var(--rr-background-color);
}

.provider-table-record > .provider-table-name-row {
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.provider-table-record:hover > .provider-table-actions-row,
.provider-table-record:focus-within > .provider-table-actions-row {
    background: var(--color-primary-soft);
}

.provider-table-name-row,
.provider-table-actions-row {
    cursor: pointer;
}

.provider-table-name-cell {
    padding: 6px 8px 4px;
}

.provider-table-name-row > td {
    border-top: 1px solid var(--color-border-strong);
}

.provider-table-name-row > td:first-child {
    border-left: 1px solid var(--color-border-strong);
}

.provider-table-name-row > td:last-child {
    border-right: 1px solid var(--color-border-strong);
}

.provider-name-text {
    display: block;
    overflow: hidden;
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.provider-table-actions-cell {
    padding: 4px 8px 6px;
    border-right: 1px solid var(--color-border-strong);
    border-bottom: 1px solid var(--color-border-strong);
    border-left: 1px solid var(--color-border-strong);
}

.provider-table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
}

.provider-table-actions .provider-portal-link,
.provider-table-actions .provider-phone-link,
.provider-table-actions .provider-email-link {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 3px 8px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.provider-table-delete-cell {
    width: 48px;
    padding: 0;
    background: var(--rr-main-color);
    text-align: center;
    vertical-align: middle;
}

.provider-table-delete-cell .rx-delete-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: auto;
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.provider-table-delete-cell .rx-delete-button svg {
    stroke-width: 2.5;
}

.provider-table-record > .provider-table-spacer-row,
.provider-table-spacer-row > td {
    height: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
}

body.provider-editor-open {
    overflow: hidden;
}

.provider-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: var(--color-overlay-strong);
}

.provider-detail-modal[hidden] {
    display: none;
}

.provider-editor-dialog {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    width: min(900px, 100%);
    height: min(760px, 100%);
    max-height: 100%;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--rr-shadow);
}

.pharmacy-editor-dialog {
    width: fit-content;
    max-width: 100%;
    height: fit-content;
    max-height: 100%;
}

.provider-editor-title {
    margin: 0;
    padding-right: 38px;
    color: var(--rr-main-color);
    font-size: 1.25rem;
    line-height: 1.2;
}

#provider-manager-app[data-screen="details"] #provider-detail {
    position: relative;
}

.row-icon-button.provider-editor-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    background: #fff;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-regular);
}

.row-icon-button.provider-editor-delete svg {
    stroke-width: 2;
}

.row-icon-button.pharmacy-editor-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    background: #fff;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-regular);
}

.row-icon-button.pharmacy-editor-delete svg {
    stroke-width: 2;
}

.provider-editor-actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 8px;
    margin-top: 16px;
}

body:is([data-page="providers"], [data-page="provider-details"], [data-page="pharmacies"]) .provider-editor-actions {
    justify-content: flex-end;
}

.provider-editor-dialog .provider-detail-form {
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.provider-editor-fields {
    display: grid;
    grid-column: 1 / -1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
}

.provider-delete-dialog-actions {
    gap: 16px;
}

.is-mobile-device body[data-page="providers"] .provider-table-record {
    touch-action: pan-y;
}

.is-mobile-device body[data-page="providers"] .provider-table-delete-cell {
    display: none;
}

.is-mobile-device body[data-page="providers"] .provider-table-name-cell {
    border-right: 1px solid var(--color-border-strong);
}

.is-mobile-device body[data-page="providers"] .provider-table-record.is-delete-revealed .provider-table-delete-cell {
    display: table-cell;
}

.is-mobile-device body[data-page="providers"] .provider-table-record.is-delete-revealed .provider-table-name-cell {
    border-right: 0;
}

.is-mobile-device body[data-page="providers"] .provider-table-delete-cell .rx-delete-button {
    display: grid;
    margin: auto 0 auto auto;
}

.is-mobile-device body[data-page="providers"] .provider-name-text {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

.is-mobile-device .provider-editor-actions {
    justify-content: flex-end;
    gap: 16px;
}

.documents-app {
    width: min(900px, 100%);
}

body[data-page="documents"] .page-panel {
    box-shadow: none;
}

.document-form {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
}

.document-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 10px 12px;
    align-items: end;
}

.document-form select,
.document-form input[type="file"] {
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--rr-text-color);
}

.document-file-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
}

.document-file-button {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

.document-file-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.document-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.document-form .rx-field-seventy-five {
    grid-column: 1 / -1;
}

body.document-editor-open {
    overflow: hidden;
}

.document-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: var(--color-overlay-strong);
}

.document-detail-modal[hidden] {
    display: none;
}

.document-editor-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    width: min(720px, 100%);
    max-height: 100%;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--rr-shadow);
}

.document-editor-title {
    margin: 0;
    color: var(--rr-main-color);
    font-size: 1.25rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.document-detail-modal .document-form {
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
}

.document-detail-modal .document-form-grid {
    min-height: 0;
    padding-right: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    align-content: start;
    -webkit-overflow-scrolling: touch;
}

.document-detail-modal .form-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.document-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.document-table-row {
    background: var(--color-surface);
    cursor: pointer;
}

.document-table-row:nth-child(even) {
    background: var(--rr-background-color);
}

.document-table-row:hover,
.document-table-row:focus-within {
    background: var(--color-primary-soft);
}

.document-table-row:not(:last-child) > td {
    border-bottom: 1px solid var(--color-border-strong);
}

.document-table-content-cell {
    min-width: 0;
    padding: 0;
}

.document-table-title-line {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    background: var(--rr-main-color);
}

.document-table-title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    padding: 4px 8px;
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.document-table-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    padding: 4px 8px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.document-table-meta span:not(:last-child)::after {
    content: "|";
    margin: 0 8px;
    color: var(--color-text-subtle);
}

.document-table-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    justify-content: flex-end;
    margin-left: auto;
    background: var(--rr-main-color);
}

.document-table-actions .document-icon-button {
    display: grid;
    place-items: center;
    width: 42px;
    min-width: 42px;
    height: auto;
    min-height: calc(1.2em + 8px);
    padding: 3px;
    border: 0;
    border-radius: 0;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
    cursor: pointer;
}

.document-table-actions .document-icon-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.document-table-actions .row-icon-button {
    grid-column: auto;
    grid-row: auto;
    align-self: stretch;
    height: auto;
}

.document-delete-dialog-title {
    overflow-wrap: anywhere;
}

.document-delete-dialog-actions {
    gap: 16px;
}

body.document-preview-open {
    overflow: hidden;
}

.document-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    background: var(--color-overlay-strong);
}

.document-preview-dialog {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--color-surface);
}

.document-preview-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.document-preview-stage {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
}

.document-preview-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--color-surface);
}

.document-preview-close {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 10px;
    border: 1px solid var(--rr-border-color);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--rr-main-color);
    box-shadow: var(--rr-shadow);
    cursor: pointer;
}

.document-preview-close svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.5;
}

.provider-portal-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
}

.provider-portal-test {
    min-height: 28px;
    margin-top: 29px;
    padding: 3px 10px;
}

.rx-summary-line-break {
    flex-basis: 100%;
    height: 0;
}

.rx-refill-alert {
    color: #C48A00;
    font-weight: var(--rr-weight-emphasis);
}

.rx-refill-danger {
    color: var(--color-danger);
    font-weight: var(--rr-weight-emphasis);
}

.rx-renewal-requested {
    color: #00A000;
    font-weight: var(--rr-weight-emphasis);
}

.rx-supply-warning {
    color: var(--color-warning);
    font-weight: var(--rr-weight-emphasis);
}

.rx-supply-danger {
    color: var(--color-danger);
    font-weight: var(--rr-weight-emphasis);
}

.rx-supply-normal {
    font-weight: var(--rr-weight-emphasis);
}

.row-icon-button {
    display: grid;
    place-items: center;
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    width: 42px;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: var(--rr-main-color);
    color: var(--color-surface);
    cursor: pointer;
    justify-self: end;
}

.user-management {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

body[data-page="user-management"] .page-content {
    overflow: hidden;
}

.user-management-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    overscroll-behavior-x: none;
    touch-action: pan-y;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    -webkit-overflow-scrolling: touch;
}

.user-management-table {
    width: 100%;
    border-spacing: 0;
    table-layout: fixed;
}

.user-management-table th,
.user-management-table td {
    padding: 9px 10px;
    border-right: 1px solid var(--rr-border-color);
    border-bottom: 1px solid var(--rr-border-color);
    text-align: left;
    overflow-wrap: anywhere;
    vertical-align: middle;
}

.user-management-table th:last-child,
.user-management-table td:last-child {
    border-right: 0;
}

.user-management-table th:first-child {
    width: 27%;
}

.user-management-table th:nth-child(2) {
    width: 43%;
}

.user-management-table th:nth-child(3) {
    width: 30%;
}

.user-management-table thead {
    position: sticky;
    top: 0;
    z-index: 3;
}

.user-management-table thead th {
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
}

.user-management-table tbody tr:nth-child(odd) td {
    background: var(--color-surface);
}

.page-content:has(.languages-page) {
    padding-bottom: 0;
    overflow: hidden;
}

body[data-page="languages"] .page-title-row {
    margin-bottom: 8px;
}

.languages-page {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    padding-bottom: 16px;
}

.languages-form {
    display: grid;
    flex: 1 1 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    overflow: hidden;
}

.languages-selected-count {
    margin-bottom: 8px;
    margin-left: 8px;
    color: var(--rr-main-color);
    font-size: 1.125rem;
    font-weight: 700;
}

.languages-table th:first-child,
.languages-table td:first-child {
    text-align: center;
}

.languages-table-wrap {
    width: max-content;
    max-width: 100%;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
}

.languages-table {
    width: max-content;
    border-spacing: 0;
}

.languages-table th,
.languages-table td {
    padding: 9px 10px;
    border-right: 1px solid var(--rr-border-color);
    border-bottom: 1px solid var(--rr-border-color);
    text-align: left;
    white-space: nowrap;
}

.languages-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--rr-main-color);
    color: var(--color-surface);
    vertical-align: middle;
}

.languages-table tbody tr:nth-child(odd) td {
    background: white;
}

.languages-table tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--rr-main-color) 11%, white);
}

.languages-table .languages-active {
    min-width: 88px;
    text-align: center;
}

.languages-active-heading {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.languages-table th.languages-active input[type="checkbox"],
.languages-table th.languages-active input[type="checkbox"]:checked {
    background: white;
}

.languages-active-heading:has(input:checked)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    width: 10px;
    height: 5px;
    border-bottom: 3px solid var(--rr-main-color);
    border-left: 3px solid var(--rr-main-color);
    transform: translateY(-70%) rotate(-45deg);
    pointer-events: none;
}

.languages-active-heading:has(input:indeterminate)::after {
    height: 0;
    border-left: 0;
    transform: translateY(-50%);
}

.languages-table input[type="checkbox"] {
    appearance: none;
    width: 22px;
    height: 22px;
    margin: 3px;
    border: 2px solid var(--rr-main-color);
    border-radius: 3px;
    background: white;
    cursor: pointer;
}

.languages-table input[type="checkbox"]:checked {
    background: var(--rr-main-color) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m3 8 3 3 7-7'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.languages-table input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--rr-main-color);
    outline-offset: 2px;
}

.languages-table input[type="checkbox"]:disabled {
    opacity: 1;
    filter: none;
    cursor: default;
}

.languages-actions {
    flex: 0 0 auto;
    gap: 12px;
}

.is-mobile-device .languages-actions {
    justify-content: flex-end;
}

.languages-table th:last-child,
.languages-table td:last-child {
    border-right: 0;
}

.languages-table tbody tr:last-child td {
    border-bottom: 0;
}

.user-management-table tbody tr:nth-child(even) td {
    background: var(--rr-background-color);
    background: color-mix(in srgb, var(--rr-main-color) 11%, white);
}

.user-management-row {
    cursor: pointer;
}

.user-management-row:focus-visible td {
    background: var(--rr-main-color) !important;
    color: var(--color-surface);
}

.user-management-row:focus-visible {
    outline: 2px solid var(--rr-main-color);
    outline-offset: -2px;
}

.user-management-type-cell {
    position: relative;
    z-index: 1;
    overflow: visible;
    padding-right: 124px !important;
}

.user-management-type-cell .user-card-actions {
    position: absolute;
    top: 50%;
    right: 6px;
    z-index: 4;
    transform: translateY(-50%);
}

.user-management-empty {
    color: var(--color-text-muted);
    text-align: center !important;
}

.user-edit-dialog {
    width: min(680px, 100%);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
}

.user-edit-dialog .user-edit-form {
    margin: 0;
}

.user-edit-form > .form-actions {
    justify-content: flex-end;
    gap: 16px;
}

.user-card-list {
    display: grid;
    gap: 8px;
}

.user-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
}

.user-card-add {
    background: #fff;
}

.user-card-add input,
.user-card-add select {
    min-height: 32px;
    padding: 4px 7px;
    border: 1px solid var(--rr-main-color);
    border-radius: 4px;
    background: var(--rr-background-color);
}

.user-card-summary {
    display: flex;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-actions {
    display: inline-flex;
    gap: 4px;
    justify-content: flex-end;
}

.user-card-actions form {
    display: inline-flex;
}

[data-user-edit-href] {
    cursor: pointer;
}

.user-row-action {
    position: static;
    grid-column: auto;
    grid-row: auto;
    align-self: center;
    width: 34px;
    min-height: 34px;
    border-radius: 6px;
}

.user-edit-form {
    margin-bottom: 6px;
}

.notes-app {
    display: grid;
    grid-template-columns: minmax(240px, var(--notes-list-pane-width, 46%)) 12px minmax(320px, 1fr);
    column-gap: 8px;
    row-gap: 14px;
    align-items: start;
    width: min(1120px, 100%);
    min-width: 0;
}

.notes-app:not(.is-note-editor-open) {
    grid-template-columns: minmax(240px, 1fr);
}

.notes-list-pane {
    display: grid;
    align-content: start;
    grid-template-rows: auto minmax(0, 1fr);
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    min-width: 0;
    min-height: 0;
    margin-bottom: 16px;
}

.notes-list {
    display: grid;
    align-content: start;
    grid-auto-rows: min-content;
    border: 1px solid var(--color-border-strong);
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
}

.notes-new-note-wrap {
    grid-column: 3;
    grid-row: 2;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--rr-main-color);
    background-color: white;
}

.is-desktop-device body[data-page="notes"] .notes-new-note-wrap,
.is-desktop-device body[data-page="ideas-tbd"] .notes-new-note-wrap {
    align-self: stretch;
    margin-bottom: 16px;
}

.is-desktop-device body[data-page="notes"] .page-content,
.is-desktop-device body[data-page="ideas-tbd"] .page-content {
    display: flex;
    padding-bottom: 0;
    overflow: hidden;
}

.is-desktop-device body[data-page="notes"] .notes-app,
.is-desktop-device body[data-page="ideas-tbd"] .notes-app {
    flex: 1 1 0;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
}

.is-desktop-device body[data-page="notes"] .notes-list-pane,
.is-desktop-device body[data-page="ideas-tbd"] .notes-list-pane {
    align-self: stretch;
    min-height: 0;
}

.is-desktop-device body[data-page="notes"] .notes-list,
.is-desktop-device body[data-page="ideas-tbd"] .notes-list {
    align-self: start;
    height: fit-content;
    max-height: 100%;
}

.is-desktop-device body[data-page="notes"] .notes-pane-divider,
.is-desktop-device body[data-page="ideas-tbd"] .notes-pane-divider {
    margin-bottom: 16px;
}

.is-desktop-device body[data-page="notes"] .notes-new-note-wrap.is-open,
.is-desktop-device body[data-page="ideas-tbd"] .notes-new-note-wrap.is-open {
    box-sizing: border-box;
    min-height: 0;
    overflow: hidden;
}

.is-desktop-device body[data-page="notes"] .notes-new-note,
.is-desktop-device body[data-page="ideas-tbd"] .notes-new-note {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    align-content: stretch;
}

.is-desktop-device body[data-page="notes"] .notes-new-note.is-locked,
.is-desktop-device body[data-page="ideas-tbd"] .notes-new-note.is-locked {
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
}

.is-desktop-device body[data-page="ideas-tbd"] .notes-app[data-admin-ideas="1"] .notes-new-note {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.is-desktop-device body[data-page="ideas-tbd"] .notes-app[data-admin-ideas="1"] .notes-new-note.is-locked {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.is-desktop-device body[data-page="notes"] .notes-content-field,
.is-desktop-device body[data-page="ideas-tbd"] .notes-content-field {
    min-height: 0;
    overflow: hidden;
}

.is-desktop-device body[data-page="notes"] .notes-content-field .tox-tinymce,
.is-desktop-device body[data-page="ideas-tbd"] .notes-content-field .tox-tinymce {
    height: 100% !important;
}

.notes-pane-divider {
    align-self: stretch;
    grid-column: 2;
    grid-row: 2;
    min-height: 160px;
    position: relative;
    cursor: col-resize;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.notes-pane-divider::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5px;
    width: 2px;
    border-radius: 2px;
    background: var(--color-border-strong);
}

.notes-pane-divider:hover::before,
.notes-pane-divider:focus::before,
.notes-app.is-resizing-notes-panes .notes-pane-divider::before {
    background: var(--rr-main-color);
}

.notes-pane-divider:focus {
    outline: 2px solid var(--rr-main-color);
    outline-offset: 2px;
}

.notes-app.is-waiting-notes-pane-resize,
.notes-app.is-resizing-notes-panes {
    cursor: col-resize;
    -webkit-user-select: none;
    user-select: none;
}

.notes-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: var(--rr-text-lg);
    font-weight: var(--rr-weight-emphasis);
    grid-column: 1 / -1;
    grid-row: 1;
}

.notes-breadcrumb button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rr-main-color);
    font: inherit;
    cursor: pointer;
}

.notes-natural-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    min-height: 38px;
    padding-top: 6px;
}

.notes-natural-sort-wrap .notes-breadcrumb {
    margin-right: auto;
    margin-left: 8px;
}

.notes-new-note-button,
.notes-new-folder-button,
.notes-natural-sort-button {
    display: inline-grid;
    place-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--rr-main-color);
    cursor: pointer;
}

.notes-new-folder-button {
    grid-auto-flow: column;
    align-items: center;
    gap: 6px;
    width: auto;
    border-radius: 4px;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
}

.notes-new-note-button {
    border: 1px solid var(--rr-main-color);
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.is-desktop-device body[data-page="notes"] .notes-new-note-button,
.is-desktop-device body[data-page="ideas-tbd"] .notes-new-note-button {
    width: 36px;
    height: 36px;
    min-height: 36px;
    margin-bottom: 8px;
    margin-right: auto;
    padding: 0;
    overflow: visible;
    border: 0;
}

.is-desktop-device body[data-page="notes"] .notes-new-note-button span,
.is-desktop-device body[data-page="ideas-tbd"] .notes-new-note-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.is-desktop-device body[data-page="notes"] .notes-new-note-button svg,
.is-desktop-device body[data-page="ideas-tbd"] .notes-new-note-button svg {
    width: 36px;
    height: 36px;
    padding: 9px;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.notes-new-note-button svg,
.notes-new-folder-button svg,
.notes-natural-sort-button svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notes-row {
    align-items: stretch;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 42px;
    min-height: 42px;
    border-bottom: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    position: relative;
}

.notes-row:last-child {
    border-bottom: 0;
}

.notes-row:hover,
.notes-row:focus-within {
    background: var(--color-primary-soft);
}

.notes-row.is-selected {
    box-shadow: inset 4px 0 0 var(--rr-main-color);
}

.notes-row[data-record-id] {
    cursor: pointer;
}

.notes-note-row {
    cursor: pointer;
}

.notes-new-folder {
    align-items: center;
    display: flex;
    gap: 6px;
    padding: 6px;
}

.notes-new-folder label {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    font-weight: var(--rr-weight-label);
    text-align: left;
}

.notes-new-folder input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    background: var(--rr-background-color);
    border-color: var(--rr-main-color);
}

.notes-drag-handle {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    place-content: center;
    gap: 3px;
    width: 32px;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    cursor: grab;
}

.notes-drag-handle:active {
    cursor: grabbing;
}

.notes-drag-handle svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.notes-item {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px 10px 10px 5px;
    color: var(--rr-text-color);
}

body:is([data-page="notes"], [data-page="ideas-tbd"]) .notes-item {
    padding: 12px 8px;
}

input[type="date"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
input[data-date-text-input]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.rx-date-control > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    font-weight: var(--rr-weight-input);
}

.notes-item-icon {
    flex: 0 0 auto;
    color: var(--rr-main-color);
}

.notes-row[data-record-type="note_folder"] .notes-item-icon {
    color: #ffd66b;
}

.notes-item-icon svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notes-row[data-record-type="note_folder"] .notes-item-icon svg {
    fill: currentColor;
    stroke: #9f6b00;
}

.notes-item-name {
    font-size: var(--rr-text-lg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notes-row[data-record-type="note_folder"] .notes-item-name {
    font-weight: var(--rr-weight-emphasis);
}

.notes-row[data-record-type="note"] .notes-item-name {
    font-weight: var(--rr-weight-regular);
}

.notes-new-note {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    grid-column: 2;
    margin-top: 0;
    padding: 0;
    background: var(--color-surface);
    min-width: 0;
}

body[data-page="ideas-tbd"] .notes-editor-delete-button {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
    width: 42px;
    height: 42px;
    background: transparent;
    color: var(--rr-main-color);
}

body[data-page="ideas-tbd"] .notes-new-note:has(.notes-editor-delete-button) .notes-folder-breadcrumb {
    padding-right: 50px;
}

.notes-new-note label {
    display: grid;
    gap: 3px;
    margin: 8px 0 0;
    padding: 0;
    font-weight: var(--rr-weight-label);
    text-align: left;
}

.notes-title-field {
    grid-column: 1 / -1;
}

.notes-lock-notice {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--color-danger);
    font-weight: 700;
    text-align: center;
}

.notes-new-note textarea {
    min-height: 110px;
    font-weight: var(--rr-input-font-weight);
    resize: vertical;
}

.notes-visibility-groups {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
}

.notes-visibility-groups legend {
    padding: 0;
    font-weight: var(--rr-weight-emphasis);
}

.notes-visibility-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
}

.notes-new-note .notes-visibility-option {
    display: flex;
    width: auto;
    min-height: 0;
    align-items: center;
    margin: 0;
    font-size: var(--rr-text-base);
    line-height: var(--rr-line-normal);
}

.notes-new-note .notes-visibility-option input[type="checkbox"] {
    width: 1em;
    height: 1em;
    margin: 0 6px 0 0;
}

.notes-new-note button {
    justify-self: start;
}

.notes-modal-close-button {
    display: none;
}

.notes-form-actions {
    position: relative;
    align-items: center;
    display: flex;
    gap: 8px;
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.notes-form-actions .notes-lock-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.notes-folder-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    grid-column: 1 / -1;
    margin-left: 8px;
    color: var(--color-text-muted);
    font-size: var(--rr-text-lg);
    font-weight: var(--rr-weight-emphasis);
}

.notes-folder-breadcrumb[role="button"] {
    cursor: pointer;
}

.notes-folder-breadcrumb-edit {
    display: inline-grid;
    place-content: center;
    margin-left: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rr-main-color);
    cursor: pointer;
}

.notes-folder-breadcrumb-edit svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notes-folder-inline-picker {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.notes-folder-inline-label {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    margin: 0 !important;
}

.notes-folder-inline-picker select {
    max-width: 220px;
}

.notes-lock-button {
    display: inline-grid;
    place-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 4px;
    background: var(--color-surface);
    color: var(--rr-main-color);
    cursor: pointer;
}

.notes-lock-button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.notes-lock-button svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notes-content-field {
    grid-column: 1 / -1;
}

.notes-content-field .tox.tox-edit-focus .tox-edit-area::before {
    inset: 1px;
    border-radius: 3px;
}

.notes-note-row {
    grid-template-columns: 32px minmax(0, 1fr) 42px;
    background: var(--color-surface);
}

.notes-note-item {
    grid-column: 2;
    padding-left: 5px;
}

.notes-note-item .notes-item-icon {
    color: var(--color-text-muted);
}

.notes-empty {
    margin: 0;
    padding: 10px;
    color: var(--color-text-muted);
}

.notes-delete-button {
    grid-column: 3;
    background: transparent;
    color: var(--rr-main-color);
}

.notes-delete-button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.notes-search-result-row {
    grid-template-columns: minmax(0, 1fr);
}

.notes-search-result {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 10px 10px;
    border: 0;
    background: transparent;
    color: var(--rr-text-color);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.notes-search-result-title {
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
}

.notes-search-result-snippet {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.3;
}

.notes-search-result mark {
    padding: 0 2px;
    background: #fff2a8;
    color: inherit;
}

@media (max-width: 760px) {
    .notes-app {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto 12px auto;
        gap: 0;
        max-width: 100%;
    }

    .notes-breadcrumb {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 10px;
    }

    .notes-list-pane {
        grid-column: 1;
        grid-row: 2;
        grid-template-rows: minmax(0, 1fr) auto;
        max-height: min(var(--notes-list-pane-height, 46vh), 50vh);
        overflow: hidden;
    }

    .notes-list {
        border: 0;
        gap: 0;
        max-height: calc(6em + 8px);
        overflow-y: auto;
    }

    .notes-natural-sort-wrap {
        align-items: center;
        min-height: 0;
        padding-top: 0;
    }

    .notes-app.has-custom-notes-pane-split .notes-list-pane,
    .notes-app.is-resizing-notes-panes .notes-list-pane {
        height: min(var(--notes-list-pane-height, 46vh), 50vh);
    }

    .notes-pane-divider {
        align-self: stretch;
        grid-column: 1;
        grid-row: 3;
        min-height: 12px;
        cursor: row-resize;
    }

    .notes-app.is-waiting-notes-pane-resize,
    .notes-app.is-resizing-notes-panes {
        cursor: row-resize;
    }

    .notes-pane-divider::before {
        top: 5px;
        bottom: auto;
        left: 0;
        right: 0;
        width: auto;
        height: 2px;
    }

    .notes-new-note-wrap,
    .notes-new-note {
        grid-column: 1;
        grid-row: 4;
        grid-template-columns: minmax(0, 1fr);
    }

    .notes-new-note-wrap {
        margin-top: 10px;
    }

    .notes-row,
    .notes-note-row {
        grid-template-columns: minmax(0, 1fr) 42px;
        min-height: 0;
        margin: 1px 0;
        border-bottom: 0;
    }

    .notes-drag-handle {
        display: none;
    }

    .notes-new-folder {
        padding: 0;
    }

    .notes-item,
    .notes-note-item,
    .notes-search-result {
        grid-column: 1;
        padding: 2px 0;
    }
}

.is-mobile-device .notes-list {
    border: 0;
    gap: 0;
}

.is-mobile-device .notes-row,
.is-mobile-device .notes-note-row {
    grid-template-columns: minmax(0, 1fr) 42px;
    min-height: 0;
    margin: 0;
    border-bottom: 0;
}

.is-mobile-device .notes-drag-handle {
    display: none;
}

.is-mobile-device .notes-item,
.is-mobile-device .notes-note-item,
.is-mobile-device .notes-search-result {
    grid-column: 1;
    padding: 2px 0;
}

.is-mobile-device body:is([data-page="notes"], [data-page="ideas-tbd"]) .notes-item {
    padding: 4px 8px;
}

.is-mobile-device .notes-new-folder {
    padding: 0;
}

.is-mobile-device .notes-row,
.is-mobile-device .notes-item,
.is-mobile-device .notes-item-name {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.is-mobile-portrait .notes-new-note-wrap {
    display: none;
}

.is-mobile-portrait .notes-pane-divider {
    display: none;
}

.is-mobile-portrait body[data-page="notes"] .page-content,
.is-mobile-portrait body[data-page="ideas-tbd"] .page-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.is-mobile-portrait body[data-page="notes"] .notes-app,
.is-mobile-portrait body[data-page="ideas-tbd"] .notes-app {
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
}

.is-mobile-portrait body[data-page="notes"] .notes-list-pane,
.is-mobile-portrait body[data-page="ideas-tbd"] .notes-list-pane {
    align-content: stretch;
    align-self: stretch;
    grid-template-rows: auto minmax(0, 1fr);
    grid-row: 2;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: hidden;
}

.is-mobile-portrait body[data-page="notes"] .notes-list,
.is-mobile-portrait body[data-page="ideas-tbd"] .notes-list {
    height: 100%;
    max-height: none;
    min-height: 0;
    padding-bottom: 128px;
}

.is-mobile-portrait .notes-row[data-record-id] {
    overflow: hidden;
}

.is-mobile-portrait .notes-row[data-record-id] .notes-item {
    transition: transform 0.16s ease;
}

.is-mobile-portrait .notes-row[data-record-id].is-delete-revealed .notes-item {
    transform: translateX(-42px);
}

.is-mobile-portrait .notes-delete-button {
    position: absolute;
    top: 0;
    right: -42px;
    bottom: 0;
    z-index: 2;
    display: inline-grid;
    place-content: center;
    width: 42px;
    min-height: 100%;
    opacity: 0;
    transition: right 0.16s ease, opacity 0.16s ease;
}

.is-mobile-portrait .notes-row.is-delete-revealed .notes-delete-button {
    right: 0;
    opacity: 1;
}

.is-mobile-portrait .notes-new-note-button {
    position: fixed;
    right: 40px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 30;
    width: 72px;
    height: auto;
    min-height: 98px;
    display: grid;
    gap: 8px;
    justify-items: center;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
    will-change: left, top;
    transform: translateZ(0);
    -webkit-tap-highlight-color: transparent;
}

.is-mobile-portrait .notes-new-note-button span {
    white-space: nowrap;
}

.is-mobile-portrait .notes-new-note-button svg {
    width: 72px;
    height: 72px;
    padding: 18px;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.45);
    filter: none;
}

.is-mobile-device body[data-page="care-recipients"] .care-recipient-add-button {
    position: fixed;
    right: 40px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 30;
    width: 72px;
    height: auto;
    min-height: 98px;
    gap: 8px;
    justify-items: center;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    color: var(--rr-main-color);
    box-shadow: none;
    font-weight: var(--rr-weight-emphasis);
    will-change: left, top;
    transform: translateZ(0);
    -webkit-tap-highlight-color: transparent;
}

.is-mobile-device body[data-page="care-recipients"] .care-recipient-add-button svg {
    width: 72px;
    height: 72px;
    padding: 18px;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.45);
    filter: none;
}

.is-mobile-device body[data-page="care-recipients"] .care-recipient-add-button span {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
}

.is-mobile-landscape body[data-page="care-recipients"] .care-recipient-add-button {
    bottom: 20px;
}

.is-mobile-portrait .notes-new-folder-button {
    font-size: 1.1rem;
}

.is-mobile-portrait .notes-new-note-wrap.is-open {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: block;
    height: auto;
    min-width: 0;
    margin: 0;
    padding-top: max(8px, calc(env(safe-area-inset-top) + 8px));
    padding-right: 2%;
    padding-bottom: max(8px, calc(env(safe-area-inset-bottom) + 8px));
    padding-left: 2%;
    background: rgba(0, 0, 0, 0.38);
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-new-note {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    align-content: stretch;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
    overflow: hidden;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-new-note.is-locked {
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
}

.is-mobile-portrait .notes-app[data-admin-ideas="1"] .notes-new-note-wrap.is-open .notes-new-note {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.is-mobile-portrait .notes-app[data-admin-ideas="1"] .notes-new-note-wrap.is-open .notes-new-note.is-locked {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-content-field {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
    min-height: 0;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-title-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-title-field input {
    flex: 1 1 auto;
    min-width: 0;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-content-field textarea {
    height: 100%;
    min-height: 0;
    resize: none;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-content-field .tox-tinymce {
    display: flex;
    flex-direction: column;
    height: 100% !important;
    min-height: 0;
    overflow: hidden;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-content-field .tox-editor-container,
.is-mobile-portrait .notes-new-note-wrap.is-open .notes-content-field .tox-sidebar-wrap,
.is-mobile-portrait .notes-new-note-wrap.is-open .notes-content-field .tox-edit-area {
    flex: 1 1 auto;
    min-height: 0;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-content-field .tox-edit-area__iframe {
    min-height: 0;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-form-actions {
    margin: 0;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-form-actions .primary-button {
    grid-column: 3;
    justify-self: end;
    border: 0;
    background: var(--color-surface);
    color: var(--rr-main-color);
}

.is-mobile-portrait body:is([data-page="notes"], [data-page="ideas-tbd"]) .notes-new-note-wrap.is-open .notes-form-actions .notes-save-button {
    background: var(--rr-main-color);
    color: #fff;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-form-actions .notes-lock-button {
    grid-column: 2;
    justify-self: center;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-modal-close-button {
    grid-column: 1;
    justify-self: start;
    display: inline-grid;
    place-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--rr-main-color);
    font: inherit;
    font-size: 1.6rem;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1;
    cursor: pointer;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-folder-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: grid;
    place-items: center;
    padding: 2%;
    background: rgba(0, 0, 0, 0.24);
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-folder-modal {
    display: grid;
    grid-template-rows: auto auto;
    width: min(78vw, 360px);
    max-height: 50vh;
    max-height: 50dvh;
    padding: 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48);
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-folder-modal-actions {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-folder-modal label {
    align-self: center;
    display: grid;
    gap: 8px;
    margin: 0;
    font-weight: var(--rr-weight-label);
}

.is-mobile-portrait .notes-new-note-wrap.is-open .notes-folder-modal select {
    width: 100%;
}

.notes-row.is-dragging {
    background: var(--color-accent-soft);
    box-shadow: inset 0 0 0 3px var(--rr-main-color);
    opacity: 0.78;
}

.notes-row.is-drop-before::before,
.notes-row.is-drop-after::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--rr-main-color);
    z-index: 2;
}

.notes-row.is-drop-before::before {
    top: -2px;
}

.notes-row.is-drop-after::after {
    bottom: -2px;
}

.rx-card:focus,
.row-icon-button:focus {
    outline: none;
}

.rx-detail {
    display: grid;
    min-width: 0;
    min-height: 0;
}

body.rx-editor-open {
    overflow: hidden;
}

.rx-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: var(--color-overlay-strong);
}

.rx-detail-modal[hidden] {
    display: none;
}

.rx-editor-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    width: min(820px, 100%);
    height: fit-content;
    max-height: 100%;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--rr-shadow);
}

.rx-record-editor-dialog {
    position: relative;
}

.is-desktop-device .rx-record-editor-dialog {
    height: fit-content;
    max-height: calc(100dvh - 36px);
}

.rx-record-editor-dialog .rx-editor-title {
    padding-right: 38px;
}

.rx-editor-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    color: var(--rr-main-color);
}

.rx-editor-delete svg {
    stroke-width: 2.5;
}

.rx-editor-title {
    margin: 0;
    color: var(--rr-main-color);
    font-size: 1.25rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.rx-editor-dialog .rx-detail-form {
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.rx-editor-dialog .rx-form-scroll,
.rx-voice-editor-dialog .rx-voice-flow {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.rx-voice-editor-dialog .rx-voice-flow {
    width: 100%;
    max-width: none;
}

.rx-editor-actions {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 16px;
}

.rx-detail > .rx-voice-review-form {
    min-height: 0;
}

.page-content:has(#rx-manager-app[data-screen="details"]) {
    display: block;
    overflow-y: auto;
}

.page-content:has(.rx-voice-flow) {
    display: block;
    overflow-y: auto;
}

#rx-manager-app[data-screen="details"] {
    min-height: 0;
}

#rx-manager-app[data-screen="details"]:has(.rx-voice-flow) {
    height: auto;
}

.rx-voice-flow {
    display: grid;
    gap: 10px;
    max-width: 760px;
}

.rx-voice-nav,
.rx-voice-actions,
.rx-voice-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rx-voice-nav {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0 0 8px;
    background: var(--rr-surface-color);
}

.rx-voice-step {
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
}

.rx-voice-step {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.rx-voice-step-review {
    min-height: 0;
}

.rx-voice-step-review .rx-voice-review-form {
    min-height: 0;
}

.rx-voice-step h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--rr-main-color);
    font-size: 1.1rem;
    line-height: 1.2;
}

.rx-voice-step h2 span {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-size: 0.9rem;
}

.rx-voice-step p {
    margin: 0;
}

.rx-voice-fields {
    margin: 0;
    color: var(--rr-main-color);
    font-size: 0.88rem;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.35;
}

.rx-voice-entry-row {
    display: block;
}

.rx-voice-entry-row label {
    display: grid;
    gap: 4px;
}

.rx-voice-entry-row textarea {
    width: 100%;
    min-height: 76px;
    padding: 8px;
    border: 1px solid var(--color-border-strong);
    border-radius: 6px;
    resize: vertical;
}

.rx-voice-entry-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.rx-voice-entry-footer small {
    color: var(--color-text-subtle);
}

.rx-voice-arrow {
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
    text-align: center;
}

.rx-voice-analysis {
    display: flex;
    align-items: center;
    gap: 12px;
}

.processing-spinner {
    width: 28px;
    height: 28px;
    border: 4px solid var(--color-primary-soft);
    border-top-color: var(--rr-main-color);
    border-radius: 50%;
    animation: rr-spin 0.9s linear infinite;
}

.rx-busy {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
}

.rx-voice-review-form {
    display: grid;
    min-height: 0;
    gap: 0;
}

.rx-form-fixed {
    background: var(--color-surface);
    padding-bottom: 4px;
}

.rx-medication-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
}

.rx-medication-title {
    margin: 0;
    color: var(--rr-main-color);
    font-size: 1.25rem;
    line-height: 1.2;
}

.rx-medication-edit {
    width: 24px;
    height: 24px;
    justify-self: start;
    background: var(--color-surface);
    color: var(--rr-main-color);
}

.rx-medication-edit svg {
    width: 15px;
    height: 15px;
}

.rx-form-scroll {
    min-height: 0;
    padding: 4px 16px;
    border: 0;
    border-radius: 4px;
    -webkit-overflow-scrolling: touch;
}

.provider-detail-form .rx-form-scroll {
    padding-left: 0;
    padding-right: 0;
}

.rx-detail-form,
.provider-detail-form {
    grid-template-columns: auto auto minmax(0, 1fr);
    column-gap: 8px;
}

.rx-detail-form > .rx-field,
.rx-detail-form > .rx-form-fixed,
.rx-detail-form > .rx-form-scroll,
.provider-detail-form > .rx-field,
.provider-detail-form > .rx-form-fixed,
.provider-detail-form > .rx-form-scroll {
    grid-column: 1 / -1;
}

.rx-detail-form > button,
.provider-detail-form > button {
    justify-self: start;
    margin-top: 16px;
}

.provider-detail-form .rx-field-pair {
    column-gap: 8px;
}

.provider-detail-form .provider-name-pair,
.provider-detail-form .provider-city-state-zip,
.provider-detail-form .provider-contact-pair {
    flex-wrap: nowrap;
}

.provider-detail-form .pharmacy-city-state-zip > .rx-field-short {
    --rx-field-width: calc(12ch + 8px);
}

.provider-detail-form .pharmacy-city-state-zip > .rx-field-tiny {
    --rx-field-width: calc(3ch + 20px);
}

.pharmacy-detail-form .rx-field-phone {
    --rx-field-width: calc(16ch + 10px);
}

.insurance-detail-form .rx-field {
    width: 100%;
    min-width: 0;
    --rx-field-width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.insurance-detail-form .rx-field-phone {
    width: max-content;
    --rx-field-width: 16ch;
    grid-template-columns: minmax(0, var(--rx-field-width));
}

.insurance-detail-form {
    grid-template-columns: auto auto minmax(0, 1fr);
    column-gap: 8px;
}

.insurance-detail-form > .rx-field,
.insurance-detail-form > .rx-form-scroll {
    grid-column: 1 / -1;
}

.insurance-detail-form > button {
    justify-self: start;
    margin-top: 16px;
}

.insurance-detail-form .rx-field-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.insurance-detail-form .insurance-rx-pair {
    grid-template-columns: minmax(0, 9ch) minmax(0, 9ch) minmax(0, 12ch);
}

.insurance-detail-form .insurance-id-pair {
    grid-template-columns: minmax(0, 20ch) minmax(0, 16ch);
}

.insurance-detail-form .insurance-policy-pair {
    grid-template-columns: minmax(0, 32ch) minmax(0, 18ch);
}

.insurance-detail-form .insurance-date-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insurance-detail-form .insurance-date-pair .rx-date-control {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 34px;
}

.problem-detail-form .rx-field {
    width: 100%;
    min-width: 0;
    --rx-field-width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.problem-detail-form {
    grid-template-columns: auto auto minmax(0, 1fr);
    column-gap: 8px;
}

.problem-detail-form > .rx-field,
.problem-detail-form > .rx-form-scroll {
    grid-column: 1 / -1;
}

.problem-detail-form > button {
    justify-self: start;
    margin-top: 16px;
}

.problem-detail-form .problem-top-pair {
    display: grid;
    grid-template-columns: minmax(0, 18ch) minmax(0, 18ch);
    gap: 8px;
}

.problem-detail-form .problem-top-pair .rx-date-control {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 34px;
}

.problem-detail-form .problem-onset-estimate {
    max-width: calc(36ch + 8px);
}

.problem-editor-dialog {
    height: fit-content;
}

.problem-editor-dialog .problem-detail-form {
    grid-template-rows: auto auto;
    height: fit-content;
}

.problem-editor-dialog .provider-editor-fields {
    align-content: start;
    grid-auto-rows: min-content;
    max-height: calc(100dvh - 190px);
}

.problem-editor-dialog .provider-editor-actions {
    margin-top: 8px;
}

.record-nav {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
}

.record-nav-title {
    display: grid;
    gap: 3px;
    justify-items: center;
    min-width: 0;
    color: var(--color-text-muted);
    text-align: center;
}

.record-nav-title strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--rr-text-color);
    font-size: 1.05rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-nav-button {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--rr-border-color);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--rr-main-color);
    cursor: pointer;
}

.record-nav-button span {
    width: 16px;
    height: 16px;
    border-top: 3px solid currentColor;
    border-left: 3px solid currentColor;
}

.record-nav-button[data-record-prev] span {
    transform: translateX(4px) rotate(-45deg);
}

.record-nav-button[data-record-next] span {
    transform: translateX(-4px) rotate(135deg);
}

.form-actions.rx-voice-review-actions {
    align-self: end;
    margin: 8px 0 0;
    padding: 8px 0 0;
    background: var(--color-surface);
}

.rx-field {
    display: grid;
    grid-template-columns: minmax(var(--rx-field-width), max-content);
    row-gap: 0;
    align-items: start;
    align-content: start;
    width: max-content;
    max-width: 100%;
    --rx-field-width: 24ch;
}

.rx-field-pair {
    display: flex;
    flex-wrap: wrap;
    column-gap: 16px;
    row-gap: 0;
    align-items: start;
}

.contact-photo-field {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
}

.contact-photo-field input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    overflow: hidden;
    opacity: 0;
    position: absolute;
    z-index: -1;
}

.contact-photo-field img,
.contact-card-photo {
    width: 56px;
    height: 56px;
    border: 1px solid var(--rr-border-color);
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-surface);
}

.contact-detail-form .provider-editor-fields > .contact-photo-field {
    grid-column: 1 / -1;
}

.contact-editor-dialog {
    position: relative;
}

.contact-editor-dialog .provider-editor-title {
    padding-right: 38px;
}

.contact-editor-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-regular);
}

.contact-editor-delete svg {
    stroke-width: 2;
}

.contact-detail-form .provider-editor-fields {
    grid-template-columns: auto auto minmax(0, 1fr);
    column-gap: 8px;
}

.contact-detail-form .provider-editor-fields > .rx-form-scroll {
    grid-column: 1 / -1;
}

.contact-detail-form .provider-editor-fields > .contact-first-name-field {
    grid-column: 1;
}

.contact-detail-form .provider-editor-fields > .contact-last-name-field {
    grid-column: 2;
}

.contact-detail-form :is(.contact-organization-field, .contact-link-field, .contact-address-field, .contact-notes-field) {
    --rx-field-width: calc(56ch + 8px);
}

.contact-detail-form .contact-notes-field textarea {
    height: calc(2lh + 10px);
    min-height: calc(2lh + 10px);
}

.contact-detail-form .contact-city-state-zip > .rx-field-tiny {
    --rx-field-width: calc(3ch + 20px);
}

.contact-detail-form .contact-city-state-zip > .rx-field-short {
    --rx-field-width: calc(11ch + 20px);
}

.contact-detail-form .provider-contact-pair > .rx-field-phone {
    --rx-field-width: calc(18ch + 20px);
}

.contact-detail-form .provider-contact-pair > .rx-field-extension {
    --rx-field-width: calc(6ch + 20px);
}

.contact-detail-form .provider-editor-actions {
    justify-content: flex-end;
}

.is-desktop-device body[data-page="contacts"] .contact-editor-dialog {
    height: fit-content;
    max-height: 100%;
}

.is-desktop-device body[data-page="contacts"] .contact-detail-form .provider-editor-fields > .contact-photo-field {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    justify-self: start;
    margin: 0;
}

.is-desktop-device body[data-page="contacts"] .contact-photo-field button {
    order: -1;
}

.is-desktop-device body[data-page="contacts"] .contact-detail-form .provider-editor-fields > .contact-first-name-field,
.is-desktop-device body[data-page="contacts"] .contact-detail-form .provider-editor-fields > .contact-last-name-field {
    grid-row: 1;
}

.is-desktop-device body[data-page="contacts"] .contact-detail-form .provider-editor-fields > .rx-form-scroll {
    grid-row: 2;
}

.contact-row .contact-card {
    display: contents;
    cursor: pointer;
}

.contact-row {
    grid-template-columns: 76px minmax(0, 1fr) 42px;
    margin-bottom: 8px;
}

.contact-row .contact-card:hover .rx-card-title,
.contact-row .contact-card:focus .rx-card-title {
    text-decoration: underline;
}

.contact-row .contact-card .contact-card-photo {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    justify-self: center;
    width: 51.2px;
    height: 51.2px;
    margin: 8px 0;
}

.contact-row .contact-card .rx-card-title,
.contact-row .contact-card .rx-card-meta {
    grid-column: 1 / 3;
}

.contact-row .contact-card.has-photo .rx-card-meta {
    grid-column: 2;
}

.contact-row .contact-card .rx-card-title {
    grid-row: 1;
}

.contact-row .contact-card .rx-card-meta {
    grid-row: 2;
    align-self: center;
    align-items: center;
}

.contact-row .rx-card-meta span:not(:last-child)::after {
    content: "";
    margin: 0;
}

.contact-row .rx-card-meta .contact-address-part:not(:last-child)::after {
    content: " |";
    margin-right: 0.25em;
}

.contact-row .rx-card-meta :is(button, a) {
    margin-right: 8px;
}

.contact-row .contact-website-link {
    width: 34px;
    min-width: 34px;
    min-height: 28px;
    padding: 3px 7px;
    background: var(--color-surface);
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-regular);
}

.contact-row .contact-website-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-row .row-icon-button {
    grid-column: 3;
    grid-row: 1;
    align-self: stretch;
}

.contact-row.no-delete-action::after {
    content: "";
    grid-column: 3;
    grid-row: 1;
    background: var(--rr-main-color);
}

.is-mobile-device body[data-page="contacts"] .contact-row {
    overflow: hidden;
    touch-action: pan-y;
}

.is-mobile-device body[data-page="contacts"] .contact-row .rx-card-title {
    grid-column: 1 / -1;
}

.is-mobile-device body[data-page="contacts"] .contact-row.no-delete-action .rx-card-title {
    grid-column: 1 / 3;
}

.is-mobile-device body[data-page="contacts"] .contact-row .rx-delete-button {
    display: none;
}

.is-mobile-device body[data-page="contacts"] .contact-row.is-delete-revealed .rx-card-title {
    grid-column: 1 / 3;
}

.is-mobile-device body[data-page="contacts"] .contact-row.is-delete-revealed .rx-delete-button {
    display: grid;
}

.rx-field-pair .rx-field + .rx-field {
    grid-template-columns: minmax(0, var(--rx-field-width));
}

.rx-field-label {
    margin: 8px 0 4px;
    padding: 0;
    font-weight: var(--rr-weight-label);
    text-align: left;
}

.rx-field input,
.rx-field textarea,
.rx-field select {
    width: 100%;
    margin: 0;
    margin-top: 0;
}

.rx-field textarea {
    height: calc(3lh + 10px);
    min-height: calc(3lh + 10px);
    overflow-y: auto;
    resize: vertical;
}

.rx-field-pair .rx-field + .rx-field .rx-field-label {
    margin-left: 0;
}

.rx-field-pair .rx-field + .rx-field > input,
.rx-field-pair .rx-field + .rx-field > select,
.rx-field-pair .rx-field + .rx-field > .rx-date-control,
.rx-field-pair .rx-field + .rx-field > .rx-stepper-control {
    margin-left: 0;
}

.rx-field-sixty {
    --rx-field-width: 60ch;
}

.rx-field-email {
    --rx-field-width: 50ch;
}

.rx-field-forty {
    --rx-field-width: 40ch;
}

.rx-field-seventy-five {
    --rx-field-width: 75ch;
}

.rx-field-portal {
    --rx-field-width: 67ch;
}

.rx-field-medium {
    --rx-field-width: 24ch;
}

.rx-field-phone {
    --rx-field-width: 16ch;
}

.rx-field-currency {
    --rx-field-width: 13ch;
}

.rx-field-out-of-pocket-cost {
    grid-template-columns: minmax(var(--rx-field-width), max-content);
}

.rx-field-out-of-pocket-cost .rx-field-label {
    white-space: nowrap;
}

.rx-field-pair-pickup .rx-checkbox-field {
    align-self: end;
    margin: 0 0 3px 16px;
}

.rx-field-currency input {
    text-align: right;
}

.rx-field-extension {
    --rx-field-width: 6ch;
}

.rx-field-name {
    --rx-field-width: 28ch;
}

.rx-field-short {
    --rx-field-width: 12ch;
}

.rx-field-title {
    --rx-field-width: 5ch;
}

.rx-field-quantity {
    --rx-field-width: calc(5ch + 10px);
}

.rx-field-tiny {
    --rx-field-width: calc(3ch + 10px);
}

.rx-field-quantity .rx-field-label {
    white-space: nowrap;
}

.rx-field-pair-quantity,
.rx-field-pair-pickup,
.rx-field-pair-refills {
    flex-wrap: nowrap;
}

.rx-field-pair-refills .rx-field-refills-before-date {
    margin-right: 34px;
}

.rx-checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: 8px;
}

.rx-checkbox-field .rx-field-label {
    margin: 0;
}

.rx-checkbox-field input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.4em;
    height: 1.4em;
    margin: 0;
}

.is-desktop-device .rx-field-pair-quantity .rx-field-quantity-on-hand {
    grid-template-columns: minmax(var(--rx-field-width), max-content);
}

.rx-field-rx-number {
    --rx-field-width: 20ch;
}

.rx-field-rx-number .rx-field-label {
    margin-bottom: 0;
}

.rx-field-renewal-requested-date .rx-field-label {
    white-space: nowrap;
}

.rx-field-date {
    --rx-field-width: 13ch;
}

.rx-field-directions {
    width: 100%;
    --rx-field-width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.rx-field-directions textarea {
    height: calc(3lh + 10px);
    min-height: calc(3lh + 10px);
}

.rx-field-reason {
    width: 100%;
    --rx-field-width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.rx-field-reason input {
    width: 100%;
}

.rx-combobox {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    width: 100%;
}

.rx-combobox > input {
    border-radius: 4px 0 0 4px;
}

.rx-combobox-toggle {
    display: grid;
    place-items: center;
    min-width: 34px;
    padding: 0;
    border: 1px solid var(--color-border-strong);
    border-left: 0;
    border-radius: 0 4px 4px 0;
    background: var(--color-surface);
    color: var(--rr-main-color);
    cursor: pointer;
}

.rx-combobox-toggle span {
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.rx-combobox-options {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    left: 0;
    z-index: 20;
    max-height: min(240px, 40dvh);
    overflow-y: auto;
    border: 1px solid var(--color-border-strong);
    border-radius: 4px;
    background: var(--color-surface);
    box-shadow: var(--rr-shadow);
}

.rx-combobox-option {
    padding: 8px;
    color: var(--rr-text-color);
    cursor: pointer;
}

.rx-combobox-option:hover,
.rx-combobox-option:focus {
    background: var(--color-primary-soft);
    outline: none;
}

.rx-field-notes {
    width: 100%;
    --rx-field-width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.rx-field-notes textarea {
    min-height: calc(3lh + 10px);
}

.rx-date-control {
    position: relative;
    display: grid;
    grid-template-columns: var(--rx-field-width) 34px;
    width: max-content;
    max-width: 100%;
    margin: 0;
}

.rx-date-control > input {
    margin: 0;
}

.rx-date-control > input:not([type="date"]) {
    font-weight: var(--rr-weight-input);
    border-radius: 4px 0 0 4px;
}

.rx-date-control > input:not([type="date"])::placeholder {
    color: var(--color-text-subtle);
    opacity: 1;
}

.rx-date-control > input[type="date"] {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: 34px;
    height: 100%;
    opacity: 0;
    pointer-events: auto;
}

.rx-date-picker-button {
    display: grid;
    place-items: center;
    min-height: 28px;
    padding: 4px;
    border: 1px solid var(--rr-main-color);
    border-left: 0;
    border-radius: 0 4px 4px 0;
    background: var(--rr-main-color);
    color: var(--color-surface);
    cursor: pointer;
}

.rr-i18n-date-control {
    display: inline-flex;
    align-items: stretch;
    width: 100%;
}

.rr-i18n-date-display {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 4px 0 0 4px;
}

.rr-i18n-date-button {
    flex: 0 0 36px;
    border-radius: 0 4px 4px 0;
}

.rr-date-picker-popover {
    position: absolute;
    z-index: 10000;
    width: min(292px, calc(100vw - 16px));
    padding: 10px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: var(--color-surface);
    box-shadow: var(--rr-shadow);
}

.rr-date-picker-nav {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rr-date-picker-nav strong {
    text-align: center;
    color: var(--rr-main-color);
}

.rr-date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.rr-date-picker-weekday,
.rr-date-picker-day {
    min-width: 0;
    min-height: 34px;
    text-align: center;
}

.rr-date-picker-weekday {
    display: grid;
    place-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text-subtle);
}

.rr-date-picker-day {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-surface);
    color: var(--rr-text-color);
}

.rr-date-picker-day.is-outside-month {
    color: var(--color-text-subtle);
}

.rr-date-picker-day.is-selected {
    border-color: var(--rr-main-color);
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-weight: 700;
}

.rx-date-picker-button svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rx-stepper-control {
    display: grid;
    grid-template-columns: var(--rx-field-width) 20px;
    width: max-content;
    max-width: 100%;
    margin: 0;
}

.rx-stepper-control > input {
    width: var(--rx-field-width);
    margin: 0;
    border-radius: 4px 0 0 4px;
}

.rx-stepper-buttons {
    display: grid;
    grid-template-rows: 1fr 1fr;
}

.rx-stepper-button {
    display: grid;
    place-items: center;
    min-height: 17px;
    padding: 0;
    border: 1px solid var(--rr-main-color);
    background: var(--color-surface);
    color: var(--rr-main-color);
    cursor: pointer;
}

.rx-stepper-button:first-child {
    border-radius: 0 4px 0 0;
    border-bottom: 0;
}

.rx-stepper-button:last-child {
    border-radius: 0 0 4px 0;
}

.rx-stepper-button svg {
    display: block;
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes rr-spin {
    to {
        transform: rotate(360deg);
    }
}

.account-page {
    width: min(760px, 100%);
}

.preferences-form {
    gap: 12px;
}

.preferences-frame {
    min-width: 0;
    margin: 0 16px 0 0;
    padding: 10px 12px 12px;
    border: 2px solid var(--rr-main-color);
    border-radius: 8px;
}

.preferences-form .mobile-nav-settings {
    margin: 0 16px 0 0;
    border: 2px solid var(--rr-main-color);
}

.preferences-frame legend {
    padding: 0 6px;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
}

.preferences-inline-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    align-items: start;
    gap: 12px;
}

.preferences-form .form-row label {
    margin-top: 0;
}

.preferences-theme-row select {
    width: 14rem;
    max-width: 100%;
}

.preferences-date-format-field select {
    width: 19ch;
    max-width: 100%;
}

.preferences-time-format-field select {
    width: 12ch;
    max-width: 100%;
}

.preferences-notify-label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 0 !important;
}

.preferences-notify-label input[type="checkbox"] {
    width: 24px;
    min-width: 24px;
    height: 24px;
    margin: 0;
}

.preferences-notify-text {
    display: grid;
}

.preferences-notify-description {
    color: var(--color-placeholder);
    font-size: var(--rr-text-sm);
    font-style: italic;
    font-weight: var(--rr-weight-regular);
}

.preferences-checkbox-list {
    display: grid;
    gap: 8px;
}

.preferences-notification-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.preferences-notification-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 24px;
    margin-bottom: 4px;
}

.preferences-push-device-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.preferences-push-device-toggle {
    width: max-content;
    max-width: 100%;
}

.preferences-push-device-status {
    color: var(--color-placeholder);
    font-size: var(--rr-text-sm);
}

.preferences-notification-reset {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 2px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--rr-main-color);
    cursor: pointer;
    margin-left: auto;
}

.push-broadcast-workarea {
    width: min(100%, 760px);
    margin-inline: auto;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--rr-main-color) 35%, transparent);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.push-broadcast-form {
    gap: 12px;
}

.push-broadcast-form > label,
.push-broadcast-options > label {
    display: grid;
    gap: 4px;
    font-weight: var(--rr-weight-label);
}

.push-broadcast-form > label.checkbox-row {
    display: flex;
    align-items: center;
}

.push-broadcast-form textarea {
    resize: vertical;
}

.push-broadcast-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.push-broadcast-warning {
    margin: 0 0 16px;
}

.push-broadcast-device-count {
    margin-top: 0;
    font-weight: var(--rr-weight-label);
}

.push-broadcast-form .form-actions {
    gap: 12px;
}

.sms-broadcast-workarea {
    width: min(100%, 760px);
    margin-inline: auto;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--rr-main-color) 35%, transparent);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.sms-broadcast-form {
    gap: 14px;
}

.sms-broadcast-form > label,
.sms-recipient-picker > label {
    display: grid;
    gap: 4px;
    font-weight: var(--rr-weight-label);
}

.sms-broadcast-form textarea {
    resize: vertical;
}

.sms-broadcast-warning {
    margin-top: 0;
}

.sms-recipient-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--rr-main-color) 35%, transparent);
    border-radius: 6px;
}

.sms-recipient-scope legend {
    padding-inline: 4px;
    font-weight: var(--rr-weight-label);
}

.sms-recipient-scope .radio-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.sms-recipient-picker {
    display: grid;
    gap: 8px;
}

.sms-recipient-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sms-recipient-search-row input {
    flex: 1 1 auto;
}

.sms-search-status {
    min-width: 7rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.sms-recipient-results {
    display: grid;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
}

.sms-recipient-result,
.sms-selected-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--rr-main-color) 25%, transparent);
    border-radius: 6px;
    background: var(--rr-background-color);
}

.sms-recipient-result > span,
.sms-selected-user > span {
    display: grid;
    min-width: 0;
}

.sms-recipient-result small,
.sms-selected-user small {
    overflow-wrap: anywhere;
    color: var(--color-text-muted);
}

.sms-recipient-result .is-unavailable {
    color: var(--color-danger);
}

.sms-recipient-result .is-available {
    color: var(--color-success);
}

.sms-recipient-picker h2 {
    margin: 8px 0 0;
    color: var(--rr-main-color);
    font-size: 1rem;
}

.sms-selected-users {
    display: grid;
    gap: 6px;
    min-height: 52px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid color-mix(in srgb, var(--rr-main-color) 25%, transparent);
    border-radius: 6px;
}

.sms-selected-user .icon-button {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 0;
    font-size: 1.35rem;
    line-height: 1;
}

.sms-character-count {
    color: var(--color-text-muted);
    font-weight: 400;
    text-align: right;
}

.sms-search-empty {
    margin: 6px 0;
    color: var(--color-text-muted);
}

@media (max-width: 620px) {
    .push-broadcast-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .sms-recipient-search-row {
        align-items: stretch;
        flex-direction: column;
        gap: 4px;
    }
}

.preferences-notification-reset:hover,
.preferences-notification-reset:focus-visible {
    background: var(--color-primary-soft);
}

.preferences-notification-reset svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.preferences-notification-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.preferences-notification-table th,
.preferences-notification-table td {
    height: 44px;
    padding: 6px 10px;
    border: 1px solid var(--color-border-strong);
}

.preferences-notification-table thead th {
    padding: 0;
    background: var(--rr-main-color);
    color: #FFFFFF;
    font-weight: var(--rr-weight-semibold);
    text-align: center;
}

.preferences-notification-table thead th:first-child {
    padding: 6px 10px;
}

.preferences-notification-column-toggle {
    width: 100%;
    min-height: 42px;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-align: center;
    white-space: normal;
    cursor: pointer;
}

.preferences-notification-column-toggle:hover,
.preferences-notification-column-toggle:focus-visible {
    background: rgb(255 255 255 / 0.14);
}

.preferences-notification-table tbody th {
    color: var(--rr-text-color);
    font-weight: var(--rr-weight-regular);
    text-align: left;
}

.preferences-notification-table td {
    text-align: center;
    vertical-align: middle;
}

.preferences-notification-table td input[type="checkbox"] {
    display: block;
    width: 24px;
    height: 24px;
    margin: auto;
}

.is-mobile-portrait .preferences-notification-preferences-frame {
    margin-right: 0;
    padding-right: 6px;
    padding-left: 6px;
}

.is-mobile-portrait .preferences-notification-table-wrap {
    overflow-x: visible;
}

.is-mobile-portrait .preferences-notification-table {
    min-width: 0;
    table-layout: fixed;
}

.is-mobile-portrait .preferences-notification-table th,
.is-mobile-portrait .preferences-notification-table td {
    height: 36px;
    padding: 3px 2px;
    overflow-wrap: anywhere;
    line-height: 1.15;
}

.is-mobile-portrait .preferences-notification-table th:first-child {
    width: 30%;
}

.is-mobile-portrait .preferences-notification-table thead th {
    padding: 0;
    font-size: 0.68rem;
    white-space: normal;
}

.is-mobile-portrait .preferences-notification-table thead th:first-child {
    padding: 3px 2px;
}

.is-mobile-portrait .preferences-notification-column-toggle {
    min-height: 34px;
    padding: 3px 2px;
}

.is-mobile-portrait .preferences-notification-table tbody th {
    font-size: 0.72rem;
}

.is-mobile-portrait .preferences-notification-table td input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.preferences-static-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    width: min(760px, 100%);
    padding: 10px 0 12px;
}

.preferences-static-actions button {
    min-width: 96px;
    margin-bottom: 16px;
}

body[data-page="settings"] .page-content {
    width: min(760px, 100%);
    margin-bottom: 16px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--rr-main-color) 70%, #000);
    border-radius: 10px;
    background: color-mix(in srgb, var(--rr-surface-color) 58%, transparent);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 4px 16px rgb(26 40 48 / 0.12);
    overflow: hidden;
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    backdrop-filter: blur(10px) saturate(120%);
}

body[data-page="settings"] .preferences-page {
    width: 100%;
    height: 100%;
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

body[data-page="settings"] .page-title-row {
    margin-bottom: 16px;
}

.is-mobile-portrait body[data-page="settings"] .page-panel {
    padding-bottom: 0;
}

.is-mobile-portrait body[data-page="settings"] .preferences-page {
    padding: 8px;
}

.is-mobile-portrait body[data-page="settings"] .preferences-static-actions {
    padding-bottom: 0;
}

.is-mobile-portrait body[data-page="settings"] .app-tab-nav {
    margin-top: 0;
}

@media (max-width: 520px) {
    .preferences-inline-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .preferences-theme-row select,
    .preferences-date-format-field select,
    .preferences-time-format-field select {
        width: 100%;
    }
}

.data-entry-form {
    display: grid;
    align-items: start;
}

.form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    align-items: start;
}

.form-field-row {
    display: flex;
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
}

.create-account-name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.form-row label {
    margin: 8px 0 0;
    padding: 0;
    font-weight: var(--rr-weight-label);
    text-align: left;
}

.field-stack {
    display: grid;
    gap: 4px;
    min-width: 0;
    margin: 0;
}

.field-stack input {
    width: min(100%, 24rem);
}

.field-stack input[type="tel"] {
    width: min(100%, 17rem);
}

.field-stack input[type="color"] {
    width: 4rem;
    height: 2.25rem;
    padding: 2px;
    cursor: pointer;
}

.number-spinner {
    display: inline-grid;
    grid-template-columns: auto 1.7rem;
    align-items: stretch;
    width: max-content;
}

.field-stack .number-spinner input[type="number"] {
    width: 4.8rem;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    text-align: right;
}

.number-spinner-buttons {
    display: grid;
    grid-template-rows: 1fr 1fr;
}

.number-spinner-buttons button {
    display: grid;
    place-content: center;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--color-border-strong);
    border-left: 0;
    background: var(--color-surface-secondary);
    color: var(--rr-text-color);
    font: inherit;
    font-size: 0.78rem;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1;
}

.number-spinner-buttons button:first-child {
    border-top-right-radius: 4px;
    border-bottom: 0;
}

.number-spinner-buttons button:last-child {
    border-bottom-right-radius: 4px;
}

.number-spinner-buttons button:active {
    background: var(--color-primary-soft);
}

.field-stack input[aria-invalid="true"] {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 2px var(--color-danger-soft);
}

.radio-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.radio-fieldset legend {
    margin: 8px 0 0;
    padding: 0;
    color: var(--color-text-muted);
    font-weight: var(--rr-weight-label);
}

.radio-options {
    display: flex;
    gap: 14px;
}

.radio-options label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.page-access-list {
    display: grid;
    min-height: 0;
    gap: 0;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    overflow: auto;
}

body[data-page="page-access"] .page-content {
    display: flex;
    overflow: hidden;
}

body[data-page="page-access"] .account-page {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
}

body[data-page="page-access"] .page-access-form {
    flex: 1 1 0;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    min-height: 0;
    overflow: hidden;
}

.page-access-actions {
    gap: 12px;
}

.page-access-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px 140px;
    align-items: center;
    border-bottom: 1px solid var(--rr-border-color);
    background: var(--color-surface);
}

.page-access-row > span {
    padding: 0 4px;
}

.page-access-row:last-child {
    border-bottom: 0;
}

.page-access-row > span:not(:first-child) {
    display: flex;
    justify-content: center;
    padding: 0;
}

.page-access-heading {
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
    text-align: center;
}

.page-access-row input {
    width: 20px;
    height: 20px;
}

.is-mobile-device body[data-page="page-access"] .page-access-actions {
    justify-content: flex-end;
}

.is-mobile-portrait body[data-page="page-access"] .page-access-row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
}

.care-recipient-photo-preview {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 5px;
    object-fit: cover;
}

.care-recipient-demographics-row {
    flex-wrap: nowrap;
    align-items: start;
    margin-top: 8px;
    margin-bottom: 8px;
}

.care-recipient-demographics-row .radio-fieldset legend,
.care-recipient-demographics-row .rx-field-date > label {
    margin: 0;
    line-height: var(--rr-line-normal);
}

.care-recipient-demographics-row .radio-options,
.care-recipient-demographics-row .rx-date-control {
    min-height: 36px;
    align-items: center;
}

.care-recipient-demographics-row .radio-options label {
    margin: 0;
}

.care-recipient-form label[for="field-middle-initial"] {
    text-align: center;
}

.care-recipient-form #field-middle-initial {
    justify-self: center;
}

.care-recipient-photo-controls {
    display: grid;
    grid-template-columns: 180px max-content;
    gap: 12px;
    width: max-content;
    max-width: 100%;
    align-items: center;
}

.form-row > .field-label {
    margin: 8px 0 0;
    font-weight: var(--rr-weight-label);
}

.care-recipient-photo-dropzone {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    width: 180px;
    height: 180px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--color-text-subtle);
    border-radius: 6px;
    background: rgb(255 255 255 / 0.46);
    color: var(--color-text-muted);
    text-align: center;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7), 0 4px 14px rgb(36 49 61 / 0.12);
    backdrop-filter: blur(10px) saturate(125%);
    -webkit-backdrop-filter: blur(10px) saturate(125%);
}

.care-recipient-photo-dropzone:has(.care-recipient-photo-preview:not([hidden])) {
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.care-recipient-photo-dropzone:has(.care-recipient-photo-preview:not([hidden])) .care-recipient-photo-drop-prompt {
    display: none;
}

.care-recipient-photo-dropzone.is-dragging {
    border-color: var(--rr-main-color);
    background: var(--color-primary-soft);
}

.care-recipient-photo-actions {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    justify-content: flex-start;
    gap: 8px;
    min-height: 180px;
}

.care-recipient-photo-controls > .field-error {
    grid-column: 1 / -1;
}

.care-recipient-photo-delete {
    gap: 7px;
    margin-top: auto;
    border-color: var(--rr-main-color);
    background: var(--rr-main-color);
    color: #fff;
}

.care-recipient-photo-paste,
.care-recipient-photo-camera {
    gap: 7px;
}

.care-recipient-photo-actions button {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    column-gap: 7px;
    width: 100%;
    border-color: var(--rr-main-color);
    background: var(--rr-main-color);
    color: #fff;
}

.care-recipient-photo-actions button span {
    min-width: 0;
    text-align: center;
}

.care-recipient-photo-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.care-recipient-photo-actions button svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.is-mobile-portrait .care-recipient-photo-controls {
    grid-template-columns: 153px max-content;
}

.is-mobile-portrait .care-recipient-photo-dropzone {
    width: 153px;
    height: 153px;
}

.is-mobile-portrait .care-recipient-photo-actions {
    min-height: 153px;
}

.care-recipient-camera-dialog {
    width: min(720px, 100%);
    max-height: 100%;
    overflow: auto;
}

.care-recipient-camera-preview {
    display: block;
    width: 100%;
    max-height: calc(100dvh - 190px);
    margin-bottom: 16px;
    border-radius: 6px;
    background: #000;
    object-fit: contain;
}

.care-recipient-camera-dialog .primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.form-help {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

.form-message,
.account-role-note {
    width: min(100%, 36rem);
    margin: 0 0 12px;
    padding: 8px 10px;
    border: 1px solid var(--rr-border-color);
    border-radius: 6px;
    background: var(--rr-background-color);
}

.form-message {
    display: grid;
    gap: 2px;
}

.ems-page {
    display: grid;
    gap: 18px;
}

.ems-qr-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.ems-qr-code {
    width: min(68vw, 260px);
    height: auto;
}

.ems-qr-link {
    display: inline-block;
    width: fit-content;
}

.ems-qr-details {
    display: grid;
    gap: 8px;
}

.ems-page h2 {
    margin: 12px 0;
    color: var(--color-primary);
}

.ems-page p {
    margin: 6px 0;
}

.ems-qr-details a {
    overflow-wrap: anywhere;
}

.ems-print-button {
    justify-self: start;
}

.ems-print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.ems-print-card {
    display: none;
}

.ems-wallet-card {
    display: none;
}

.ems-print-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.ems-public-page {
    min-height: 100vh;
    padding: 18px;
    background: var(--color-bg, #f6f8fa);
    color: #1f2933;
}

.ems-public-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ems-report-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.ems-report-back {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rr-main-color);
    cursor: pointer;
}

.ems-report-back span {
    width: 22px;
    height: 22px;
    border-left: 4px solid currentColor;
    border-bottom: 4px solid currentColor;
    transform: rotate(45deg);
}

.ems-report-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--color-primary, #173e39);
}

.ems-report-brand strong {
    overflow: hidden;
    font-weight: var(--rr-weight-emphasis);
    font-size: 1.12rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ems-report-brand img {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    object-fit: contain;
    transform: scale(1.27);
    transform-origin: center;
}

.ems-print-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    color: #000;
}

.ems-print-brand strong {
    overflow: hidden;
    font-size: 1.12rem;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ems-print-brand img {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    object-fit: contain;
    transform: scale(1.27);
    transform-origin: center;
}

.ems-wallet-photo {
    width: 0.95in;
    height: 0.95in;
    object-fit: cover;
    border-radius: 0.06in;
}

.ems-public-card h2,
.ems-public-card h3 {
    color: var(--color-primary, #173e39);
}

.ems-patient-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.ems-patient-grid-no-photo {
    grid-template-columns: 1fr;
}

.ems-patient-section h2 {
    margin-top: 0;
}

.ems-report-photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.ems-summary,
.ems-list-item dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.ems-summary div,
.ems-list-item dl div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
}

.ems-patient-grid .ems-summary div {
    grid-template-columns: 1fr;
    gap: 2px;
}

.ems-summary dt,
.ems-list-item dt {
    font-weight: var(--rr-weight-emphasis);
}

.ems-summary dd,
.ems-list-item dd {
    margin: 0;
}

.ems-section-heading {
    margin-top: 32px;
}

.ems-list {
    display: grid;
    gap: 12px;
}

.ems-list-item {
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 8px;
}

.ems-medication-card {
    background: #eaf3f8;
}

.ems-provider-card {
    background: #f8e8ef;
}

.ems-list-item h3 {
    margin: 0 0 10px;
}

@media (max-width: 700px) {
    .ems-qr-panel {
        grid-template-columns: 1fr;
    }

    .ems-qr-code {
        justify-self: center;
    }

    .ems-report-photo {
        justify-self: start;
        width: 96px;
        height: 96px;
    }
}

@media print {
    body[data-page="ems"] {
        height: auto;
        overflow: visible;
        background: #fff;
    }

    body[data-page="ems"] .app-header,
    body[data-page="ems"] .app-tab-nav,
    body[data-page="ems"] .environment-indicator,
    body[data-page="ems"] .sync-status,
    body[data-page="ems"] .menu-backdrop,
    body[data-page="ems"] .side-menu,
    body[data-page="ems"] .page-title-row,
    body[data-page="ems"] .ems-qr-panel {
        display: none !important;
    }

    body[data-page="ems"] .app-shell,
    body[data-page="ems"] .app-main,
    body[data-page="ems"] .page-panel,
    body[data-page="ems"] .page-content,
    body[data-page="ems"] .ems-page {
        display: block;
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 0;
        margin: 0;
        background: #fff;
        box-shadow: none;
    }

    body[data-page="ems"].rr-print-qr .ems-print-card,
    body[data-page="ems"]:not(.rr-print-wallet) .ems-print-card {
        display: grid;
        justify-items: center;
        gap: 18px;
        color: #000;
        text-align: center;
    }

    body[data-page="ems"] .ems-print-card h2 {
        margin: 0;
        color: #000;
        font-size: 2rem;
    }

    body[data-page="ems"] .ems-print-card .ems-qr-code {
        width: 131px;
        max-width: 100%;
    }

    body[data-page="ems"].rr-print-wallet .ems-print-card {
        display: none;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-card {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 0.057in;
        width: 2.875in;
        height: 1.875in;
        padding: 0.127in;
        color: #000;
        border: 1px solid #999;
        background: #fff;
        overflow: hidden;
        page-break-inside: avoid;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.085in;
        line-height: 1.1;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-header h1 {
        margin: 0;
        color: var(--color-accent);
        font-size: 0.943rem;
        line-height: 1.1;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-header > span {
        display: flex;
        align-items: center;
        gap: 0.043in;
        color: var(--color-accent);
        font-size: 0.663rem;
        white-space: nowrap;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-header img {
        width: 0.276in;
        height: 0.276in;
        object-fit: contain;
        transform: scale(1.27);
        transform-origin: center;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-name {
        font-weight: var(--rr-weight-emphasis);
        font-size: 0.648rem;
        line-height: 1.1;
        text-align: center;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-body {
        display: grid;
        grid-template-columns: 0.779in minmax(0, 0.637in) 0.622in;
        gap: 0.156in;
        align-items: center;
        min-height: 0;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-photo-cell {
        display: grid;
        justify-items: center;
        gap: 0.043in;
        min-height: 0.672in;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-photo {
        width: 0.672in;
        height: 0.672in;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-instructions {
        display: contents;
        min-width: 0;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-instructions p {
        margin: 0;
        font-size: 0.486rem;
        line-height: 1.2;
        text-align: left;
        align-self: center;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-card .ems-qr-code {
        width: 0.622in;
        max-width: 100%;
        align-self: center;
    }

    body[data-page="ems"].rr-print-wallet .ems-wallet-footer {
        align-self: end;
        margin: 0;
        font-size: 0.446rem;
        font-weight: var(--rr-weight-emphasis);
        line-height: 1.5;
        text-align: center;
    }
}

.form-success {
    border-color: var(--color-success);
    background: var(--color-success-soft);
}

.form-error,
.field-error {
    color: var(--color-danger);
}

.form-error {
    border-color: var(--color-danger);
    background: var(--color-danger-soft);
}

.field-error {
    max-width: 30rem;
    font-size: 0.9rem;
    font-weight: var(--rr-weight-emphasis);
}

.password-control {
    display: grid;
    grid-template-columns: minmax(0, 24rem) 34px;
    width: min(100%, calc(24rem + 34px));
}

.password-control input {
    width: 100%;
    border-radius: 4px 0 0 4px;
}

.password-toggle {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 28px;
    padding: 0;
    border: 1px solid var(--rr-main-color);
    border-left: 0;
    border-radius: 0 4px 4px 0;
    background: var(--rr-main-color);
    color: var(--color-surface);
    cursor: pointer;
}

.password-toggle::before {
    content: "";
    width: 18px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 50% / 65%;
}

.password-toggle::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.form-actions {
    display: flex;
    margin: 16px 0 0;
}

.login-form-actions {
    flex-wrap: wrap;
    gap: 12px;
}

.care-recipient-actions {
    flex-wrap: wrap;
    gap: 12px;
}

body[data-page="care-recipient"] .page-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    overflow: hidden;
}

body[data-page="care-recipient"] .account-page {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
}

body[data-page="care-recipient"] .care-recipient-form {
    position: relative;
    flex: 0 1 auto;
    align-self: stretch;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    width: max-content;
    max-width: 100%;
    min-height: 0;
    padding: 16px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--rr-shadow);
    box-sizing: border-box;
    overflow: hidden;
}

body[data-page="care-recipient"] .care-recipient-form > .form-message {
    grid-row: 1;
}

body[data-page="care-recipient"] .care-recipient-form > .form-field-row {
    grid-row: 2;
    padding-right: 48px;
}

.care-recipient-scroll-region {
    grid-row: 3;
    align-self: stretch;
    max-width: 100%;
    min-height: 0;
    padding: 4px 4px 4px 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

body[data-page="care-recipient"] .care-recipient-actions {
    grid-row: 4;
    justify-content: flex-end;
    margin-top: 8px;
    padding: 8px 0 0;
}

.care-recipient-form :is(input, select, textarea, button):disabled,
.care-recipient-photo-dropzone[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

.care-recipient-delete-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 7px;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--color-danger);
    cursor: pointer;
}

.care-recipient-delete-icon:hover {
    color: #a31616;
}

.care-recipient-delete-icon:focus-visible {
    border-radius: 6px;
    outline: 3px solid currentColor;
    outline-offset: 1px;
}

.care-recipient-delete-icon svg {
    display: block;
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.care-recipient-delete-notice {
    width: 100%;
    max-width: none;
}

.care-recipient-recovery-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
    margin-top: 20px;
}

.care-recipient-recovery-form label {
    flex-basis: 100%;
    color: var(--color-text-muted);
    font-weight: var(--rr-weight-emphasis);
}

.care-recipient-recovery-form select {
    min-height: 36px;
    max-width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: var(--rr-background-color);
    color: var(--color-text);
}

.care-recipient-leave-team-form {
    position: absolute;
    top: 8px;
    left: 8px;
}

.care-recipient-leave-team-button {
    border-color: var(--color-danger);
    background: transparent;
    color: var(--color-danger);
}

.login-passkey-actions {
    margin: 0 0 8px;
}

body[data-page="log-in"] {
    background: #eef3ed;
}

body[data-page="log-in"] .app-shell,
body[data-page="log-in"] .desktop-layout-row,
body[data-page="log-in"] .app-main,
body[data-page="log-in"] .page-panel,
body[data-page="log-in"] .page-content,
body[data-page="log-in"] .account-page {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
}

body[data-page="log-in"] .app-shell {
    display: block;
}

body[data-page="log-in"] .app-header,
body[data-page="log-in"] .page-title-row {
    display: none;
}

body[data-page="log-in"] .desktop-layout-row,
body[data-page="log-in"] .app-main {
    display: block;
    margin: 0;
    padding: 0;
}

body[data-page="log-in"] .page-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body[data-page="log-in"] .page-content {
    padding: 0;
    overflow: hidden;
}

.welcome-screen {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 100%;
    background-color: #eef3ed;
    background-image: var(--rr-welcome-background);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #173e39;
    overflow: hidden;
}

.welcome-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(255, 246, 229, 0.06), rgba(255, 246, 229, 0.2) 55%, rgba(255, 246, 229, 0.28));
}

.welcome-language {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    color: #1f2f2d;
    cursor: pointer;
    font-size: 1.18rem;
    font-weight: var(--rr-weight-semibold);
}

.welcome-language-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.welcome-language .language-selector {
    min-width: 220px;
}

.welcome-language .language-selector summary {
    color: inherit;
    font-weight: inherit;
}

.welcome-content {
    position: relative;
    align-self: center;
    justify-self: end;
    display: grid;
    justify-items: center;
    width: min(360px, calc(100vw - 44px));
    margin: 4vh 5.6vw 0 0;
}

.welcome-content::before {
    content: "";
    position: absolute;
    top: -74px;
    left: 50%;
    z-index: -1;
    width: 520px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 252, 238, 0.98) 0%, rgba(255, 248, 226, 0.86) 36%, rgba(255, 240, 205, 0.58) 62%, rgba(255, 232, 190, 0) 100%);
    filter: blur(14px);
    transform: translateX(calc(-50% + 180px - 27.734vw));
}

.welcome-logo {
    display: block;
    width: min(300px, 84%);
    height: auto;
    margin: -34px 0 6px;
    object-fit: contain;
    transform: translateX(calc(180px - 27.734vw));
}

.welcome-back {
    position: relative;
    margin: 0 0 32px;
    color: #173e39;
    font-size: clamp(1.65rem, 2.5vw, 2.25rem);
    line-height: 1.1;
    text-align: center;
    text-shadow: 0 1px 10px rgba(255, 252, 242, 1), 0 0 24px rgba(255, 248, 226, 0.95);
    transform: translateX(calc(180px - 27.734vw));
}

.welcome-back::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -18px;
    width: 66px;
    height: 2px;
    background: #d95e87;
    transform: translateX(-50%);
}

.welcome-login-form {
    display: grid;
    gap: 12px;
    width: 100%;
    max-height: calc(100dvh - 32px);
    padding: 16px;
    background: rgba(242, 232, 216, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 6px;
    box-shadow: 0 18px 50px rgba(28, 36, 30, 0.22);
    -webkit-backdrop-filter: blur(4px) saturate(1.12);
    backdrop-filter: blur(4px) saturate(1.12);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(calc(180px - 27.734vw));
}

.welcome-field {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    min-height: 54px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(71, 71, 63, 0.28);
    border-radius: 6px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65);
}

.welcome-field-no-icon {
    grid-template-columns: minmax(0, 1fr);
}

.welcome-field input {
    width: 100%;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #233836;
    font-weight: var(--rr-weight-input);
    outline: 0;
}

.welcome-field input::placeholder {
    color: rgba(35, 56, 54, 0.62);
    opacity: 1;
}

.welcome-field:focus-within {
    border-color: #17423c;
    box-shadow: 0 0 0 3px rgba(23, 66, 60, 0.18);
}

.welcome-user-field .welcome-field-icon,
.welcome-password-field .welcome-field-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: #3d4946;
}

.welcome-field-icon svg,
.welcome-passkey-button svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.welcome-password-field {
    grid-template-columns: 38px minmax(0, 1fr) 34px;
}

.welcome-password-toggle {
    width: 34px;
    min-height: 34px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #3d4946;
}

.welcome-password-toggle::before {
    width: 21px;
    height: 13px;
}

.welcome-login-actions {
    display: grid;
    gap: 10px;
    margin: 2px 0 0;
}

.welcome-login-actions .primary-button,
.welcome-login-actions .secondary-button {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 50px;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: var(--rr-weight-emphasis);
    text-decoration: none;
}

.welcome-login-actions .primary-button {
    background: #173e39;
}

.welcome-login-actions .secondary-button {
    background: rgba(255, 255, 255, 0.72);
    color: #263735;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 7px 16px rgba(28, 36, 30, 0.1);
}

.welcome-password-login {
    display: grid;
    gap: 12px;
}

.welcome-password-login summary.secondary-button {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 50px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: var(--rr-weight-emphasis);
    list-style: none;
    text-decoration: none;
}

.welcome-password-login summary.secondary-button::-webkit-details-marker {
    display: none;
}

.welcome-password-login[open] > summary {
    display: none;
}

.welcome-login-actions .welcome-password-submit {
    border-color: var(--rr-main-color);
    background: var(--rr-main-color);
    color: #ffffff;
    font-weight: 700;
}

.welcome-or {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    color: rgba(35, 56, 54, 0.7);
    font-size: 1rem;
}

.welcome-or::before,
.welcome-or::after {
    content: "";
    height: 1px;
    background: rgba(35, 56, 54, 0.16);
}

.welcome-forgot-password {
    justify-self: center;
    color: #183632;
    font-size: 0.98rem;
    font-weight: var(--rr-weight-semibold);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

body[data-page="log-in"] .field-error {
    width: 100%;
    margin: -10px 0 0;
    color: #7a1f1f;
    font-weight: var(--rr-weight-emphasis);
}

.welcome-passkey-button {
    grid-auto-flow: column;
    justify-content: center;
    gap: 12px;
    font-size: 0.98rem !important;
}

.welcome-passkey-button span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #173e39;
}

.welcome-passkey-button.primary-button span {
    color: #fff;
}

.passkey-add-actions {
    margin: 0 0 12px;
}

.passkey-list {
    display: grid;
    width: min(100%, 36rem);
    border: 1px solid var(--rr-border-color);
}

.passkey-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid var(--rr-border-color);
    background: var(--color-surface);
}

.passkey-row:last-child {
    border-bottom: 0;
}

.passkey-row span {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

.schedule-app {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 18px;
}

.is-desktop-device body[data-page="schedule"] .schedule-app,
.is-desktop-device body[data-page="diary"] .diary-app {
    margin-left: 0;
    margin-right: auto;
}

.schedule-actions-row,
.schedule-form-actions,
.schedule-calendar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-actions-row {
    gap: 32px;
    justify-content: flex-end;
}

.schedule-actions-row .schedule-title-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
}

.is-desktop-device body[data-page="schedule"] .schedule-actions-row .schedule-title-search {
    position: static;
    left: auto;
    width: auto;
    transform: none;
}

.schedule-today-button {
    flex: 0 0 auto;
    background: var(--rr-main-color);
    color: #fff;
    font-weight: var(--rr-weight-emphasis);
}

.is-mobile-device .schedule-actions-row .schedule-title-search,
.is-mobile-device .schedule-actions-row .schedule-today-button {
    margin-top: 12px;
    margin-bottom: 12px;
}

.schedule-add-button,
.diary-add-button {
    display: grid;
    place-content: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    cursor: pointer;
}

.schedule-add-button svg,
.diary-add-button svg {
    display: block;
    width: 36px;
    height: 36px;
    padding: 9px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedule-add-button span,
.diary-add-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.schedule-event-form {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface-secondary);
}

.schedule-event-form label {
    display: grid;
    gap: 4px;
    font-weight: var(--rr-weight-label);
}

.schedule-event-form textarea {
    resize: vertical;
}

.schedule-editor-dialog .schedule-event-form {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: var(--color-surface);
}

.schedule-editor-scroll {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    padding-right: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-editor-dialog {
    position: relative;
}

.is-mobile-device .schedule-editor-dialog {
    height: calc(100dvh - 36px);
    max-height: calc(100dvh - 36px);
}

.is-mobile-device .schedule-form-actions {
    position: static;
    flex: 0 0 auto;
    padding-top: 10px;
    border-top: 1px solid var(--rr-border-color);
}

.is-mobile-portrait .schedule-editor-dialog {
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
}

.schedule-editor-dialog .rx-editor-title {
    padding-right: 38px;
}

.schedule-editor-dialog:has(.schedule-editor-create-request:not([hidden])) .rx-editor-title {
    padding-right: 80px;
}

.schedule-editor-dialog:has(.schedule-editor-delete:not([hidden])):has(.schedule-editor-create-request:not([hidden])) .rx-editor-title {
    padding-right: 146px;
}

.schedule-editor-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    height: 36px;
    min-height: 36px;
    align-self: auto;
    background: #fff;
    color: var(--rr-main-color);
}

.schedule-editor-create-request {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    min-height: 36px;
    align-self: auto;
    background: #fff;
}

.schedule-editor-dialog:has(.schedule-editor-delete:not([hidden])) .schedule-editor-create-request {
    right: 52px;
    margin-right: 16px;
}

.schedule-editor-create-request img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.schedule-editor-delete svg,
.schedule-event-delete svg {
    stroke-width: 2;
}

.schedule-form-grid {
    display: grid;
    grid-template-columns: max-content max-content max-content auto;
    gap: 10px;
}

.schedule-date-time-row,
.schedule-length-tentative-row {
    display: contents;
}

.schedule-timing-field {
    display: grid;
}

.schedule-timing-field > [hidden] {
    display: none;
}

.schedule-date-field .rr-i18n-date-display {
    flex: 0 0 calc(18ch + 8px);
    width: calc(18ch + 8px);
}

.schedule-time-field input[type="time"] {
    width: 14ch;
    min-width: 14ch;
}

.schedule-length-field,
.schedule-length-field select,
.schedule-when-field,
.schedule-when-field select,
.schedule-travel-time-field,
.schedule-travel-time-field select {
    width: max-content;
    max-width: none;
}

.schedule-checkbox-label {
    align-items: center;
    width: fit-content;
}

.schedule-form-grid .schedule-checkbox-label {
    align-self: end;
    min-height: 36px;
    margin: 0;
}

.schedule-checkbox-label input[type="checkbox"] {
    width: 1.6em;
    height: 1.6em;
}

.schedule-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    justify-content: flex-end;
    padding-top: 10px;
    background: var(--color-surface);
}

.schedule-calendar-nav {
    justify-content: space-between;
}

.schedule-calendar-nav h2,
.schedule-selected-events h3,
.schedule-list-day h2 {
    margin: 0;
    color: var(--rr-main-color);
    font-size: 1.1rem;
    line-height: 1.2;
}

.schedule-nav-button {
    min-width: 42px;
    padding-inline: 10px;
}

.schedule-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    column-gap: 2px;
    row-gap: 0;
    margin-top: 8px;
    margin-bottom: 16px;
}

.schedule-weekday {
    padding: 4px 0;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: var(--rr-weight-emphasis);
    text-align: center;
}

.schedule-day {
    display: grid;
    place-items: center;
    width: 100%;
    height: 44px;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    border: 1px solid var(--rr-border-color);
    border-radius: 0;
    background: var(--color-surface);
    color: var(--rr-text-color);
    cursor: pointer;
}

.schedule-day span {
    font-weight: var(--rr-weight-regular);
}

.schedule-day.is-outside-month {
    color: var(--color-text-subtle);
    background: var(--color-surface-secondary);
}

.schedule-day.has-events {
    background: var(--rr-main-color);
}

.schedule-day.has-events span {
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
}

.schedule-day.is-today {
    border-color: var(--rr-main-color);
}

.schedule-day.is-selected {
    outline: 3px solid var(--color-primary-soft);
    background: #00B050;
}

.schedule-day.is-selected span {
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
}

.schedule-selected-events,
.schedule-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.schedule-list {
    margin-top: 0;
}

.schedule-list-day {
    display: grid;
    gap: 8px;
    scroll-margin-top: 8px;
}

.schedule-list-day h2 {
    margin-top: 24px;
}

.schedule-event-list {
    display: grid;
    gap: 8px;
}

.schedule-event-row {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--rr-text-color);
    text-align: left;
    cursor: default;
}

.schedule-event-row.is-busy {
    padding: 10px;
    cursor: default;
}

.schedule-event-open {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px;
    border: 0;
    background: var(--color-surface);
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.schedule-event-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.schedule-event-delete {
    flex: 0 0 42px;
    align-self: center;
    margin-right: 6px;
    background: var(--color-surface);
    color: var(--rr-main-color);
}

.schedule-event-create-request {
    flex: 0 0 36px;
    align-self: center;
    width: 36px;
    height: 36px;
    margin-right: 0;
    background: var(--color-surface);
}

.schedule-event-create-request img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.schedule-event-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.schedule-event-main p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

.schedule-event-time {
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
}

.is-mobile-device .schedule-form-grid {
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-device .schedule-date-time-row,
.is-mobile-device .schedule-length-tentative-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.is-mobile-device .schedule-length-tentative-row {
    justify-content: flex-start;
}

.is-mobile-device .schedule-event-form textarea {
    height: calc(2lh + 10px);
    min-height: calc(2lh + 10px);
}

.is-mobile-device .schedule-event-delete,
.is-mobile-device .schedule-event-create-request {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 48px;
    height: auto;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.is-mobile-device .schedule-event-row.has-two-actions .schedule-event-create-request {
    right: 48px;
}

.is-mobile-device .schedule-event-open {
    position: relative;
    z-index: 1;
    width: 100%;
    transition: transform 160ms ease;
}

.is-mobile-device .schedule-event-row.is-delete-revealed .schedule-event-open {
    transform: translateX(-48px);
}

.is-mobile-device .schedule-event-row.has-two-actions.is-delete-revealed .schedule-event-open {
    transform: translateX(-96px);
}

.is-mobile-device .schedule-event-row.is-delete-revealed .schedule-event-delete,
.is-mobile-device .schedule-event-row.is-delete-revealed .schedule-event-create-request {
    opacity: 1;
    pointer-events: auto;
}

.schedule-event-tentative {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.86rem;
    font-weight: var(--rr-weight-emphasis);
}

.schedule-empty {
    margin: 0;
    color: var(--color-text-muted);
}

.is-mobile-portrait body[data-page="schedule"] .page-panel {
    padding-top: 6px;
    padding-bottom: 6px;
}

.is-mobile-portrait body[data-page="schedule"] .page-content {
    padding-bottom: 0;
}

.is-mobile-portrait body[data-page="schedule"] .page-title-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 5px 8px;
}

.is-mobile-portrait body[data-page="home"] .page-title-row,
.is-mobile-portrait body[data-page="care-team-dashboard"] .page-title-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 8px;
}

.is-mobile-portrait body[data-page="home"] .care-central-title-search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    margin: 0 0 8px;
}

.is-mobile-portrait body[data-page="schedule"] .page-title-row .page-icon,
.is-mobile-portrait body[data-page="diary"] .page-title-row .page-icon {
    grid-column: 1;
    grid-row: 1;
}

.is-mobile-portrait body[data-page="schedule"] .page-title-row h1,
.is-mobile-portrait body[data-page="diary"] .page-title-row h1 {
    grid-column: 2 / -1;
    grid-row: 1;
}

.is-mobile-portrait body[data-page="schedule"] .schedule-title-search,
.is-mobile-portrait body[data-page="diary"] .diary-title-search {
    grid-column: 1 / 3;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    margin-left: 0;
}

.is-mobile-portrait body[data-page="schedule"] .schedule-title-view-actions,
.is-mobile-portrait body[data-page="diary"] .diary-title-view-actions {
    grid-column: 3;
    grid-row: 2;
    margin-left: 0;
}

.is-mobile-portrait body[data-page="schedule"] .page-title-row h1 {
    grid-column: 2;
}

.is-mobile-portrait body[data-page="schedule"] .schedule-title-view-actions {
    grid-row: 1;
}

.is-mobile-portrait body[data-page="schedule"] .page-icon,
.is-mobile-portrait body[data-page="rx-manager"] .page-icon {
    width: 50px;
    height: 50px;
    margin-left: -10px;
}

.is-mobile-portrait body[data-page="schedule"] h1 {
    font-size: 1.7rem;
}

.is-mobile-portrait .schedule-app {
    gap: 6px;
    max-width: 100%;
    padding-bottom: 0;
}

.is-mobile-portrait .schedule-add-button,
.is-mobile-portrait .diary-add-button {
    position: fixed;
    right: 40px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 30;
    width: 72px;
    height: auto;
    min-height: 98px;
    gap: 8px;
    justify-items: center;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
}

.is-mobile-portrait .schedule-add-button svg,
.is-mobile-portrait .diary-add-button svg {
    width: 72px;
    height: 72px;
    padding: 18px;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    box-shadow: none;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
}

.is-mobile-portrait .schedule-add-button span,
.is-mobile-portrait .diary-add-button span {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
}

.is-mobile-portrait .schedule-view-button {
    min-height: 30px;
    padding: 3px 10px;
}

.is-mobile-portrait .schedule-actions-row .primary-button,
.is-mobile-portrait .schedule-actions-row .secondary-button,
.is-mobile-portrait .schedule-nav-button {
    min-height: 30px;
    padding: 3px 10px;
}

.is-mobile-portrait .schedule-calendar-nav h2,
.is-mobile-portrait .schedule-selected-events h3,
.is-mobile-portrait .schedule-list-day h2 {
    font-size: 0.98rem;
}

.is-mobile-portrait .schedule-calendar {
    column-gap: 2px;
    row-gap: 0;
    margin-top: 4px;
}

.is-mobile-portrait .schedule-weekday {
    padding: 1px 0;
    font-size: 0.68rem;
}

.is-mobile-portrait .schedule-day {
    height: 34px;
    font-size: 0.9rem;
}

.is-mobile-portrait .schedule-selected-events,
.is-mobile-portrait .schedule-list {
    gap: 6px;
    margin-top: 6px;
}

.is-mobile-portrait .schedule-list-day,
.is-mobile-portrait .schedule-event-list {
    gap: 5px;
}

.is-mobile-portrait .schedule-event-row {
    gap: 6px;
    padding: 0;
    border-radius: 6px;
}

.is-mobile-portrait .schedule-event-row.is-busy,
.is-mobile-portrait .schedule-event-open {
    padding: 6px 8px;
}

.is-mobile-portrait .schedule-event-main p {
    font-size: 0.82rem;
    line-height: 1.25;
}

.is-mobile-portrait .schedule-empty {
    font-size: 0.9rem;
}

.diary-app {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 18px;
}

.diary-actions-row,
.diary-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.diary-actions-row {
    justify-content: space-between;
}

.is-desktop-device body[data-page="diary"] .diary-actions-row {
    justify-content: space-between;
}

.diary-entry-form {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface-secondary);
}

.diary-entry-form label {
    display: grid;
    gap: 4px;
    font-weight: var(--rr-weight-label);
}

.diary-entry-form textarea {
    resize: vertical;
}

.diary-form-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px;
}

.diary-list {
    display: grid;
    gap: 10px;
}

.diary-entry-card {
    display: block;
}

.diary-entry-main {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--rr-text-color);
    text-align: left;
    cursor: pointer;
}

.diary-entry-main:hover,
.diary-entry-main:focus {
    border-color: var(--rr-main-color);
    outline: 3px solid var(--color-primary-soft);
    outline-offset: 1px;
}

.diary-entry-date {
    color: var(--rr-main-color);
    font-size: 0.9rem;
    font-weight: var(--rr-weight-emphasis);
}

.diary-entry-main p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.35;
    white-space: pre-wrap;
}

.diary-entry-main p strong {
    color: var(--rr-text-color);
}

.diary-empty,
.diary-entry-empty {
    margin: 0;
    color: var(--color-text-muted);
}

.is-mobile-portrait body[data-page="diary"] .page-title-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 5px 8px;
}

.is-mobile-portrait body[data-page="diary"] .page-icon {
    width: 50px;
    height: 50px;
    margin-left: -10px;
}

.is-mobile-portrait body[data-page="diary"] h1 {
    font-size: 1.7rem;
}

.is-mobile-portrait .diary-app {
    gap: 6px;
    max-width: 100%;
    padding-bottom: 0;
}

.is-mobile-portrait .diary-form-grid {
    grid-template-columns: 1fr;
}

.is-mobile-portrait .diary-view-button,
.is-mobile-portrait .diary-actions-row .primary-button,
.is-mobile-portrait .diary-form-actions .primary-button,
.is-mobile-portrait .diary-form-actions .secondary-button,
.is-mobile-portrait .diary-form-actions .danger-button {
    min-height: 30px;
    padding: 3px 10px;
}

.is-mobile-portrait .diary-entry-form,
.is-mobile-portrait .diary-entry-main {
    padding: 8px;
    border-radius: 6px;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
    text-decoration: none;
    cursor: pointer;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-weight: var(--rr-weight-emphasis);
    text-decoration: none;
    cursor: pointer;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--color-danger);
    border-radius: 6px;
    background: var(--color-danger);
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
    text-decoration: none;
    cursor: pointer;
}

.primary-button:focus,
.secondary-button:focus,
.danger-button:focus,
.password-toggle:focus,
.field-stack input:focus {
    outline: 3px solid var(--color-primary-soft);
    outline-offset: 1px;
}

.app-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: var(--color-overlay-strong);
}

.app-dialog {
    width: min(420px, 100%);
    padding: 18px;
    border: 0;
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 12px 18px 42px rgba(15, 23, 42, 0.52), 4px 8px 16px rgba(15, 23, 42, 0.32);
}

.app-dialog h2,
.app-dialog > .request-editor-caption {
    margin: -18px -18px 16px;
    padding: 10px 18px;
    border-radius: 7px 7px 0 0;
    background: var(--rr-main-color);
    color: #fff;
    font-size: 1.3rem;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.2;
    cursor: pointer;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.app-dialog.is-dialog-dragging h2,
.app-dialog.is-dialog-dragging > .request-editor-caption {
    cursor: grabbing;
}

.app-dialog p {
    margin: 0 0 16px;
}

.app-dialog:has(.preferences-notification-confirm-content) {
    width: min(760px, 100%);
}

.preferences-notification-confirm-content .preferences-notification-table-wrap {
    max-height: min(55vh, 440px);
    margin-bottom: 16px;
    overflow: auto;
}

.preferences-notification-confirm-content .preferences-notification-table input:disabled,
.preferences-notification-confirm-content .preferences-notification-column-toggle:disabled {
    opacity: 1;
}

.preferences-notification-confirm-content .preferences-notification-table input[type="checkbox"]:disabled {
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--color-text-muted);
    border-radius: 3px;
    background: #fff;
    cursor: default;
}

.preferences-notification-confirm-content .preferences-notification-table input[type="checkbox"]:checked:disabled {
    border-color: var(--rr-main-color);
    background: var(--rr-main-color);
}

.preferences-notification-confirm-content .preferences-notification-table input[type="checkbox"]:checked:disabled::after {
    position: absolute;
    top: 43%;
    left: 50%;
    width: 28%;
    height: 52%;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    content: "";
    transform: translate(-50%, -50%) rotate(45deg);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

.markdown-content > :last-child {
    margin-bottom: 0;
}

.page-content > :last-child {
    margin-bottom: 0;
}

.is-desktop-device .app-header {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    padding-inline: 24px;
}

.is-desktop-device .brand strong {
    font-size: 2.48rem;
}

.is-desktop-device .brand {
    position: absolute;
    left: 50%;
    margin-right: 0;
    transform: translateX(-50%);
}

.is-desktop-device .app-tab-nav {
    display: none;
}

.is-desktop-device .side-menu {
    right: 24px;
}

.is-desktop-device .account-menu {
    left: 24px;
}

.is-mobile-portrait .brand span {
    display: none;
}

.is-mobile-portrait .welcome-screen::before {
    background: linear-gradient(180deg, rgba(255, 246, 229, 0.18), rgba(255, 246, 229, 0.06) 45%, rgba(255, 246, 229, 0.24));
}

.is-mobile-portrait .welcome-language {
    top: max(6px, env(safe-area-inset-top));
    right: max(2px, env(safe-area-inset-right));
    font-size: 1rem;
}

.is-mobile-portrait .welcome-language .language-selector summary {
    padding-right: 22px;
}

.is-mobile-portrait .welcome-content {
    position: absolute;
    top: max(42px, env(safe-area-inset-top));
    left: 50%;
    align-self: start;
    justify-self: start;
    grid-template-rows: auto auto auto;
    width: min(330px, calc(100vw - 28px));
    min-height: calc(100dvh - max(42px, env(safe-area-inset-top)) - 32px);
    margin: 0;
    transform: translateX(-50%);
}

.is-mobile-portrait .welcome-logo {
    width: min(159px, 41%);
    margin: 0 0 6px;
    transform: none;
}

.is-mobile-portrait .welcome-back {
    margin-bottom: 32px;
    font-size: clamp(1.35rem, 6vw, 1.9rem);
    transform: none;
}

.is-mobile-portrait .welcome-login-form {
    align-self: start;
    justify-self: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - max(42px, env(safe-area-inset-top)) - 180px);
    min-width: 0;
    padding: 12px;
    transform: none;
}

.is-mobile-portrait .welcome-language,
.is-mobile-portrait .welcome-password-login,
.is-mobile-portrait .welcome-login-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.is-mobile-portrait .welcome-language {
    justify-self: center;
}

.is-mobile-portrait .welcome-language .language-selector {
    max-width: 100%;
    min-width: 0;
}

.is-mobile-portrait .welcome-field {
    min-height: 44px;
}

.is-mobile-portrait .welcome-field input {
    min-height: 34px;
}

.is-mobile-portrait .welcome-login-actions .primary-button,
.is-mobile-portrait .welcome-login-actions .secondary-button,
.is-mobile-portrait .welcome-password-login summary.secondary-button {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 42px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 0.95rem;
    line-height: 1.18;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center;
}

.is-mobile-portrait .welcome-forgot-password {
    margin-top: 4px;
    font-size: 0.9rem;
}

.is-mobile-portrait .welcome-passkey-button {
    flex-wrap: wrap;
    font-size: 0.9rem !important;
}

.is-mobile-portrait .care-recipient-picker {
    margin-left: -16px;
}

.is-mobile-portrait .care-recipient-menu {
    left: -54px;
}

.is-mobile-portrait .app-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding-top: env(safe-area-inset-top);
}

@media (display-mode: standalone) {
    html.is-mobile-device .app-shell,
    html.is-mobile-device body[data-page="log-in"] .app-shell,
    html.is-mobile-device body[data-page="log-in"] .desktop-layout-row,
    html.is-mobile-device body[data-page="log-in"] .app-main,
    html.is-mobile-device body[data-page="log-in"] .page-panel,
    html.is-mobile-device body[data-page="log-in"] .page-content,
    html.is-mobile-device body[data-page="log-in"] .account-page {
        height: 100lvh;
    }
}

.is-mobile-portrait body[data-page="log-in"] .app-shell {
    padding-top: 0;
    background: transparent;
}

.is-mobile-portrait .app-header {
    background: transparent;
}

.is-mobile-portrait .app-tab-nav {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.is-mobile-device .app-tab-nav {
    border-top: 0;
}

.is-mobile-portrait .app-tab-nav {
    grid-row: 3;
    position: relative;
    z-index: 22;
    max-width: none;
    margin-top: -1px;
    padding: 6px 8px;
    border-bottom: 0;
    border-radius: 0;
    box-shadow: none;
}

.is-mobile-portrait .app-tab-item {
    min-height: 58px;
    padding: 5px 4px;
}

.is-mobile-portrait .app-tab-label {
    font-size: 0.78rem;
}

.is-mobile-portrait .app-tab-label-full {
    display: none;
}

.is-mobile-portrait .app-tab-label-short {
    display: block;
}

html.is-mobile-device .mobile-administration-tile {
    display: grid;
}

.is-mobile-portrait .care-central-login-sticky {
    bottom: calc(82px + env(safe-area-inset-bottom));
}

.is-mobile-portrait .app-main {
    grid-row: 2;
    padding: 0;
}

.is-mobile-portrait .user-management-type-cell {
    overflow: visible;
    padding-right: 10px !important;
}

.is-mobile-portrait [data-user-row] .user-card-actions {
    top: 50%;
    right: -150px;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-50%);
    transition: right 0.16s ease, opacity 0.16s ease;
}

.is-mobile-portrait [data-user-row].is-actions-revealed .user-card-actions {
    right: 4px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.is-mobile-portrait .page-panel {
    min-width: 0;
    padding: 0 14px 6px;
    border: 0;
    border-bottom: 1px solid var(--rr-border-color);
    border-radius: 0;
    box-shadow: none;
}

.is-mobile-portrait body[data-page="view-logs"] .page-panel {
    padding-right: 0;
    padding-left: 0;
}

.is-mobile-portrait body[data-page="view-logs"] .page-title-row,
.is-mobile-portrait body[data-page="view-logs"] .view-logs-actions,
.is-mobile-portrait body[data-page="view-logs"] .view-logs-panel h2 {
    padding-right: 8px;
    padding-left: 8px;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-actions {
    gap: 6px;
    margin-bottom: 10px;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-actions .primary-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 6px;
    font-size: 0.78rem;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-panel h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-table-wrap {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-table {
    table-layout: fixed;
    width: 100%;
    font-size: 0.594rem;
    line-height: 1.15;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-table th,
.is-mobile-portrait body[data-page="view-logs"] .view-logs-table td {
    padding: 2px 1px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-table th:first-child,
.is-mobile-portrait body[data-page="view-logs"] .view-logs-table td:first-child {
    width: 31%;
    min-width: 0;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-table th:nth-child(2),
.is-mobile-portrait body[data-page="view-logs"] .view-logs-table td:nth-child(2) {
    width: 17%;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-table th:nth-child(3),
.is-mobile-portrait body[data-page="view-logs"] .view-logs-table td:nth-child(3) {
    width: 22%;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-table-wrap-audit {
    overflow-x: auto;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-table-audit th:nth-child(3),
.is-mobile-portrait body[data-page="view-logs"] .view-logs-table-audit td:nth-child(3) {
    width: 25ch;
    min-width: 25ch;
}

.is-mobile-portrait body[data-page="view-logs"] .view-logs-table th:nth-child(4),
.is-mobile-portrait body[data-page="view-logs"] .view-logs-table td:nth-child(4),
.is-mobile-portrait body[data-page="view-logs"] .view-logs-table th:nth-child(5),
.is-mobile-portrait body[data-page="view-logs"] .view-logs-table td:nth-child(5) {
    width: 15%;
}

.is-mobile-portrait .page-title-row {
    align-items: center;
    gap: 8px;
}

.is-mobile-portrait body[data-page="care-recipients"] .page-title-row {
    margin-bottom: 16px;
}

.is-mobile-portrait .page-icon {
    width: 50px;
    height: 50px;
    margin-left: -10px;
}

.is-mobile-portrait body[data-page="providers"] .page-icon,
.is-mobile-portrait body[data-page="provider-details"] .page-icon,
.is-mobile-portrait body[data-page="insurance"] .page-icon,
.is-mobile-portrait body[data-page="insurance-details"] .page-icon,
.is-mobile-portrait body[data-page="problems"] .page-icon,
.is-mobile-portrait body[data-page="pharmacies"] .page-icon,
.is-mobile-portrait body[data-page="documents"] .page-icon,
.is-mobile-portrait body[data-page="contacts"] .page-icon {
    width: 50px;
    height: 50px;
}

.is-mobile-portrait body[data-page="providers"] .page-title-row h1,
.is-mobile-portrait body[data-page="provider-details"] .page-title-row h1,
.is-mobile-portrait body[data-page="insurance"] .page-title-row h1,
.is-mobile-portrait body[data-page="insurance-details"] .page-title-row h1,
.is-mobile-portrait body[data-page="problems"] .page-title-row h1,
.is-mobile-portrait body[data-page="pharmacies"] .page-title-row h1,
.is-mobile-portrait body[data-page="documents"] .page-title-row h1,
.is-mobile-portrait body[data-page="contacts"] .page-title-row h1 {
    font-size: clamp(1.55rem, 8vw, 2rem);
}

.is-mobile-portrait body[data-page="providers"] .rx-manager-app,
.is-mobile-portrait body[data-page="provider-details"] .rx-manager-app,
.is-mobile-portrait body[data-page="insurance"] .rx-manager-app,
.is-mobile-portrait body[data-page="insurance-details"] .rx-manager-app,
.is-mobile-portrait body[data-page="problems"] .rx-manager-app,
.is-mobile-portrait body[data-page="pharmacies"] .rx-manager-app,
.is-mobile-portrait body[data-page="documents"] .rx-manager-app,
.is-mobile-portrait body[data-page="contacts"] .rx-manager-app {
    width: 100%;
    min-width: 0;
}

.is-mobile-portrait body[data-page="providers"] .rx-card-meta,
.is-mobile-portrait body[data-page="insurance"] .rx-card-meta,
.is-mobile-portrait body[data-page="problems"] .rx-card-meta,
.is-mobile-portrait body[data-page="pharmacies"] .rx-card-meta,
.is-mobile-portrait body[data-page="documents"] .rx-card-meta,
.is-mobile-portrait body[data-page="contacts"] .rx-card-meta {
    min-width: 0;
    overflow-wrap: anywhere;
}

.is-mobile-portrait body[data-page="providers"] .rx-card-meta button,
.is-mobile-portrait body[data-page="pharmacies"] .rx-card-meta button,
.is-mobile-portrait body[data-page="documents"] .rx-card-meta button,
.is-mobile-portrait body[data-page="contacts"] .rx-card-meta button {
    max-width: 100%;
}

.is-mobile-portrait body[data-page="home"] .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(87px, 106px));
    grid-auto-rows: 83px;
    justify-content: center;
}

.is-mobile-portrait body[data-page="home"] .page-title-row,
.is-mobile-portrait body[data-page="care-team-dashboard"] .page-title-row {
    padding-right: 14px;
    padding-left: 14px;
}

.is-mobile-portrait .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(88px, 107px));
    grid-auto-rows: 83px;
    gap: 7px;
}

.is-mobile-portrait .home-tile {
    grid-template-rows: 43px minmax(0, 1fr);
    gap: 4px;
    height: 83px;
    padding: 7px;
}

.is-mobile-portrait .home-tile img {
    max-width: 64px;
    max-height: 43px;
}

.is-mobile-portrait body[data-page="home"] .sortable-tile {
    grid-template-rows: 46px minmax(0, 1fr);
    gap: 2px;
    height: 83px;
    padding: 5px;
}

.is-mobile-portrait body[data-page="home"] .sortable-tile img {
    max-width: 69px;
    max-height: 46px;
}

.is-mobile-portrait body[data-page="care-team-dashboard"] .care-team-dashboard-tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(87px, 106px));
    grid-auto-rows: 83px;
}

.is-mobile-portrait body[data-page="care-team-dashboard"] .care-team-dashboard-tile {
    grid-template-rows: 46px minmax(0, 1fr);
    gap: 2px;
    height: 83px;
    padding: 5px;
}

.is-mobile-portrait body[data-page="care-team-dashboard"] .care-team-dashboard-tile > img:not(.care-team-btg-badge) {
    max-width: 69px;
    max-height: 46px;
}

.is-mobile-portrait body[data-page="home"] .sortable-tile .tile-label {
    font-size: 0.79rem;
    line-height: 1.05;
    font-weight: var(--rr-weight-emphasis);
    color: var(--rr-main-color);
    -webkit-line-clamp: 2;
}

.is-mobile-portrait .tile-label {
    font-size: 0.78rem;
    line-height: 1.08;
    -webkit-line-clamp: 3;
}

.is-mobile-portrait body[data-page="care-team-dashboard"] .care-team-dashboard-tile .tile-label {
    font-size: 0.79rem;
    line-height: 1.05;
    font-weight: var(--rr-weight-emphasis);
    color: var(--rr-main-color);
    -webkit-line-clamp: 2;
}

.is-mobile-portrait .care-recipient-tile-main {
    grid-template-rows: 43px minmax(0, 1fr);
}

.is-mobile-portrait .home-tile img.care-recipient-tile-photo {
    width: 64px;
    height: 43px;
}

.is-mobile-portrait body[data-page="care-recipients"] .care-recipient-list .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 134px));
    grid-auto-rows: 104px;
}

.is-mobile-portrait body[data-page="care-recipients"] .care-recipient-tile {
    height: 104px;
}

.is-mobile-portrait body[data-page="care-recipients"] .care-recipient-tile-main {
    grid-template-rows: 67.5px minmax(0, 1fr);
}

.is-mobile-portrait body[data-page="care-recipients"] .home-tile img.care-recipient-tile-photo {
    width: 100px;
    height: 67.5px;
}

.is-mobile-portrait .field-stack input,
.is-mobile-portrait .field-stack input[type="tel"],
.is-mobile-portrait .password-control,
.is-mobile-portrait .form-message,
.is-mobile-portrait .account-role-note {
    width: 100%;
}

.is-mobile-portrait .field-stack .number-spinner,
.is-mobile-portrait .field-stack .number-spinner input[type="number"] {
    width: max-content;
}

.is-mobile-portrait body[data-page="rr-companion"] .page-content,
.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-config,
.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-config form,
.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-link,
.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-view-card,
.is-mobile-portrait body[data-page="rr-companion"] .rr-widget-config,
.is-mobile-portrait body[data-page="rr-companion"] .rr-template-preview {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-actions,
.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-view-fields,
.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-block-fields,
.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-view-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-block-config,
.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-config label {
    min-width: 0;
    width: 100%;
}

.is-mobile-portrait body[data-page="rr-companion"] .rr-widget-config-grid {
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-config input,
.is-mobile-portrait body[data-page="rr-companion"] .rr-companion-config select {
    width: 100%;
    min-width: 0;
}

.is-mobile-portrait body[data-page="rr-companion"] .rr-checkbox-label input[type="checkbox"] {
    width: 24px;
    min-width: 24px;
    height: 24px;
}

.is-mobile-device body[data-page="rr-companion"] .page-content {
    overflow: hidden;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-actions {
    display: none;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-link-actions {
    flex-wrap: nowrap;
    align-items: flex-start;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-link-actions form {
    width: 100%;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-link-actions form .secondary-button {
    width: 100%;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-url-actions,
.is-mobile-device body[data-page="rr-companion"] .rr-companion-editor-actions {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
}

.is-mobile-device body[data-page="rr-companion"] .rr-view-drag-handle,
.is-mobile-device body[data-page="rr-companion"] .rr-view-list-actions {
    display: none;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-view-list li.is-actions-revealed .rr-view-list-actions {
    display: flex;
}

.is-mobile-device .add-new[data-add-new] {
    position: fixed;
    right: 40px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 30;
    width: 72px;
    height: auto;
    min-height: 72px;
    gap: 0;
    justify-items: center;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
    touch-action: none;
    user-select: none;
}

.is-mobile-device .add-new[data-add-new] svg {
    width: 72px;
    height: 72px;
    padding: 18px;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    box-shadow: none;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
}

.is-mobile-device .add-new[data-add-new] span {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-view-card {
    display: none;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-view-card.is-modal-open {
    position: fixed;
    inset: 12px;
    z-index: 10000;
    display: grid;
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    align-content: start;
    border: 2px solid var(--rr-main-color);
    box-shadow: 0 0 0 100vmax rgb(0 0 0 / 55%);
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-view-card.is-modal-open {
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-view-card.is-modal-open > .rr-template-preview {
    grid-column: 1;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-modal-heading,
.is-mobile-device body[data-page="rr-companion"] .rr-companion-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-modal-actions {
    position: sticky;
    bottom: -14px;
    justify-content: flex-end;
    margin: 0 -14px -14px;
    padding: 12px 14px;
    border-top: 1px solid var(--rr-border-color);
    background: var(--rr-surface-color);
}

.rr-view-modal-open {
    overflow: hidden;
}

.rr-view-action-dialog label {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    font-weight: var(--rr-weight-label);
}

.rr-view-action-dialog input[type="number"] {
    width: 8ch;
}

.is-mobile-portrait .password-control {
    grid-template-columns: minmax(0, 1fr) 34px;
}

.is-mobile-portrait .rx-voice-nav {
    display: none;
}

.is-mobile-portrait .rx-detail-modal {
    padding: 10px;
}

.is-mobile-device .rx-record-editor-dialog {
    height: calc(100dvh - 68px);
    max-height: calc(100dvh - 68px);
}

.is-mobile-portrait .rx-record-editor-dialog {
    height: calc(100dvh - 52px);
    max-height: calc(100dvh - 52px);
}

.is-mobile-portrait .rx-detail-modal .rx-voice-nav {
    display: flex;
}

.is-mobile-portrait .rx-voice-step-review {
    gap: 6px;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-medication-heading {
    margin-bottom: 0;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-notes textarea {
    height: calc(2lh + 10px);
    min-height: calc(2lh + 10px);
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-directions textarea {
    height: calc(2lh + 10px);
    min-height: calc(2lh + 10px);
}

.is-mobile-portrait .rx-field-pair {
    gap: 8px;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-pickup {
    flex-wrap: wrap;
    row-gap: 16px;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-pickup .rx-checkbox-field {
    flex-basis: 100%;
    align-self: auto;
    margin: 0;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-quantity {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-quantity > .rx-field:last-child {
    flex-basis: 100%;
}

.is-mobile-portrait .rx-field-pair-medication {
    display: flex;
    flex-wrap: wrap;
    column-gap: 12px;
}

.is-mobile-portrait .rx-field-pair-medication .rx-field {
    min-width: 0;
}

.is-mobile-portrait body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-form-fixed,
.is-mobile-portrait body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-form-scroll {
    width: 100%;
    min-width: 0;
    padding-right: 0;
    padding-left: 0;
}

.is-mobile-portrait body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field {
    min-width: 0;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-pharmacy {
    flex-wrap: wrap;
    row-gap: 8px;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-pharmacy > .rx-field:first-child {
    flex-basis: 100%;
}

.is-mobile-portrait body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-pharmacy .rx-field-name {
    --rx-field-width: 12ch;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-pharmacy .rx-field-pharmacy-name {
    --rx-field-width: 25ch;
}

.is-mobile-portrait body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-pharmacy .rx-field-rx-number {
    --rx-field-width: 14ch;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-refills {
    flex-wrap: wrap;
    row-gap: 8px;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-refills > .rx-field:last-child {
    flex-basis: 100%;
}

.is-mobile-device body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-refills > .rx-field:not(:last-child) .rx-field-label {
    margin-top: 12px;
}

.is-mobile-portrait body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-refills {
    column-gap: 6px;
}

.is-mobile-portrait body:is([data-page="rx-details"], [data-page="rx-manager"]) .rx-field-pair-refills .rx-field-date {
    --rx-field-width: 12ch;
}

.is-mobile-portrait .provider-name-pair {
    display: flex;
    flex-wrap: nowrap;
    column-gap: 8px;
}

.is-mobile-portrait .provider-city-state-zip {
    display: flex;
    flex-wrap: nowrap;
    column-gap: 8px;
}

.is-mobile-portrait .provider-name-pair .rx-field,
.is-mobile-portrait .provider-city-state-zip .rx-field {
    min-width: 0;
}

.is-mobile-portrait .provider-name-pair .rx-field-name {
    --rx-field-width: 11ch;
}

.is-mobile-portrait .provider-name-pair .rx-field-short {
    --rx-field-width: 8ch;
}

.is-mobile-portrait .provider-city-state-zip .rx-field-name {
    --rx-field-width: 13ch;
}

.is-mobile-portrait body[data-page="provider-details"] .provider-detail-form .rx-form-fixed,
.is-mobile-portrait body[data-page="provider-details"] .provider-detail-form .rx-form-scroll,
.is-mobile-portrait body[data-page="providers"] .provider-detail-modal .provider-detail-form .rx-form-fixed,
.is-mobile-portrait body[data-page="providers"] .provider-detail-modal .provider-detail-form .rx-form-scroll,
.is-mobile-portrait body[data-page="insurance-details"] .provider-detail-form .rx-form-fixed,
.is-mobile-portrait body[data-page="insurance-details"] .provider-detail-form .rx-form-scroll,
.is-mobile-portrait body[data-page="pharmacies"] .provider-detail-modal .provider-detail-form .rx-form-fixed,
.is-mobile-portrait body[data-page="pharmacies"] .provider-detail-modal .provider-detail-form .rx-form-scroll,
.is-mobile-portrait body[data-page="contacts"] .provider-detail-modal .provider-detail-form .rx-form-fixed,
.is-mobile-portrait body[data-page="contacts"] .provider-detail-modal .provider-detail-form .rx-form-scroll {
    width: 100%;
    min-width: 0;
}

.is-mobile-portrait body[data-page="documents"] .document-detail-modal .document-form,
.is-mobile-portrait body[data-page="documents"] .document-detail-modal .document-form-grid,
.is-mobile-portrait body[data-page="documents"] .document-detail-modal .document-form .rx-field {
    width: 100%;
    min-width: 0;
}

.is-mobile-portrait body[data-page="documents"] .document-detail-modal .document-form-grid {
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-portrait body[data-page="documents"] .document-detail-modal .document-form .rx-field {
    --rx-field-width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-portrait body[data-page="documents"] .document-detail-modal {
    padding: 10px;
}

.is-mobile-device body[data-page="documents"] .document-table-row {
    touch-action: pan-y;
}

.is-mobile-device body[data-page="documents"] .document-table-actions {
    display: none;
}

.is-mobile-device body[data-page="documents"] .document-table-row.is-actions-revealed .document-table-actions {
    display: flex;
}

.is-mobile-device body[data-page="documents"] .document-icon-button {
    width: 38px;
    min-width: 38px;
    padding-inline: 2px;
}

.is-mobile-portrait body[data-page="provider-details"] .provider-detail-form .rx-field-pair,
.is-mobile-portrait body[data-page="providers"] .provider-detail-modal .provider-detail-form .rx-field-pair,
.is-mobile-portrait body[data-page="insurance-details"] .provider-detail-form .rx-field-pair,
.is-mobile-portrait body[data-page="pharmacies"] .provider-detail-modal .provider-detail-form .rx-field-pair,
.is-mobile-portrait body[data-page="contacts"] .provider-detail-modal .provider-detail-form .rx-field-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.is-mobile-portrait body[data-page="provider-details"] .provider-detail-form .rx-field,
.is-mobile-portrait body[data-page="providers"] .provider-detail-modal .provider-detail-form .rx-field,
.is-mobile-portrait body[data-page="insurance-details"] .provider-detail-form .rx-field,
.is-mobile-portrait body[data-page="pharmacies"] .provider-detail-modal .provider-detail-form .rx-field,
.is-mobile-portrait body[data-page="contacts"] .provider-detail-modal .provider-detail-form .rx-field {
    width: 100%;
    min-width: 0;
    --rx-field-width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-portrait body[data-page="contacts"] .provider-detail-modal .provider-detail-form .provider-city-state-zip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 4.5rem) minmax(0, 7.5rem);
}

.is-mobile-portrait body[data-page="pharmacies"] .provider-detail-modal .provider-detail-form .pharmacy-city-state-zip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 4.5rem) minmax(0, 7.5rem);
}

.is-mobile-portrait body[data-page="contacts"] .provider-detail-modal .provider-detail-form .provider-contact-pair {
    grid-template-columns: minmax(0, calc(18ch + 20px)) minmax(0, calc(6ch + 20px));
}

.is-mobile-portrait body[data-page="insurance-details"] .provider-detail-form .insurance-rx-pair {
    grid-template-columns: minmax(0, 9ch) minmax(0, 9ch) minmax(0, 12ch);
}

.is-mobile-portrait body[data-page="insurance-details"] .provider-detail-form .insurance-id-pair {
    grid-template-columns: minmax(0, 20ch) minmax(0, 16ch);
}

.is-mobile-portrait body[data-page="insurance-details"] .provider-detail-form .insurance-policy-pair {
    grid-template-columns: minmax(0, 32ch) minmax(0, 18ch);
}

.is-mobile-portrait body[data-page="insurance-details"] .provider-detail-form .rx-field-phone {
    width: max-content;
    --rx-field-width: 16ch;
    grid-template-columns: minmax(0, var(--rx-field-width));
}

.is-mobile-portrait body[data-page="insurance-details"] .provider-detail-form .insurance-date-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.is-mobile-portrait body[data-page="problems"] .provider-detail-modal .provider-detail-form .rx-field {
    width: 100%;
    min-width: 0;
    --rx-field-width: 100%;
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-portrait body[data-page="problems"] .provider-detail-modal .provider-detail-form .problem-top-pair {
    display: grid;
    grid-template-columns: minmax(0, 18ch) minmax(0, 18ch);
    gap: 8px;
}

.is-mobile-portrait body[data-page="provider-details"] .provider-portal-row,
.is-mobile-portrait body[data-page="providers"] .provider-detail-modal .provider-portal-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.is-mobile-portrait body[data-page="provider-details"] .provider-portal-test,
.is-mobile-portrait body[data-page="providers"] .provider-detail-modal .provider-portal-test {
    margin-top: 0;
}

.is-mobile-portrait body[data-page="providers"] .provider-detail-modal,
.is-mobile-portrait body[data-page="pharmacies"] .provider-detail-modal,
.is-mobile-portrait body[data-page="problems"] .provider-detail-modal,
.is-mobile-portrait body[data-page="contacts"] .provider-detail-modal {
    padding: 8px;
}

.is-mobile-portrait body[data-page="providers"] .provider-editor-dialog,
.is-mobile-portrait body[data-page="pharmacies"] .provider-editor-dialog,
.is-mobile-portrait body[data-page="problems"] .provider-editor-dialog,
.is-mobile-portrait body[data-page="contacts"] .provider-editor-dialog {
    width: 100%;
    max-height: 100%;
    padding: 12px;
}

body[data-page="providers"] .provider-detail-modal .provider-detail-form .rx-field-pair.provider-name-pair {
    display: grid;
    grid-template-columns: calc(5ch + 10px) minmax(0, 1fr) minmax(0, 1fr) calc(8ch + 10px);
    gap: 8px;
    width: 100%;
}

body[data-page="providers"] .provider-detail-modal .provider-detail-form .rx-field-pair.provider-city-state-zip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) calc(3ch + 10px) minmax(8ch, 12ch);
    gap: 8px;
    width: 100%;
}

body[data-page="providers"] .provider-detail-modal .provider-detail-form .rx-field-pair.provider-contact-pair {
    display: grid;
    grid-template-columns: calc(20ch + 10px) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
}

body[data-page="providers"] .provider-detail-modal .provider-detail-form .provider-name-pair > .rx-field,
body[data-page="providers"] .provider-detail-modal .provider-detail-form .provider-city-state-zip > .rx-field,
body[data-page="providers"] .provider-detail-modal .provider-detail-form .provider-contact-pair > .rx-field {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
}

body[data-page="providers"] .provider-detail-modal .provider-detail-form .provider-name-pair > .rx-field-title {
    --rx-field-width: calc(5ch + 10px);
}

body[data-page="providers"] .provider-detail-modal .provider-detail-form .provider-name-pair > .rx-field-short {
    --rx-field-width: calc(8ch + 10px);
}

body[data-page="providers"] .provider-detail-modal .provider-detail-form .provider-city-state-zip > .rx-field-tiny {
    --rx-field-width: calc(3ch + 10px);
}

body[data-page="providers"] .provider-detail-modal .provider-detail-form .provider-contact-pair > .rx-field-medium {
    --rx-field-width: calc(20ch + 10px);
}

.is-mobile-device body[data-page="providers"] .provider-detail-modal .provider-detail-form .rx-field-pair.provider-contact-pair {
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-device body[data-page="providers"] .provider-detail-modal .provider-detail-form .provider-contact-pair > .rx-field-medium {
    max-width: calc(20ch + 10px);
}

.is-mobile-portrait .rx-field input,
.is-mobile-portrait .rx-field select,
.is-mobile-portrait .rx-date-control,
.is-mobile-portrait .rx-stepper-control,
.is-mobile-portrait .rx-field-pair .rx-field + .rx-field > input,
.is-mobile-portrait .rx-field-pair .rx-field + .rx-field > select,
.is-mobile-portrait .rx-field-pair .rx-field + .rx-field > .rx-date-control,
.is-mobile-portrait .rx-field-pair .rx-field + .rx-field > .rx-stepper-control {
    margin-left: 0;
}

.is-mobile-landscape .app-shell {
    position: fixed;
    inset: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
}

.is-mobile-landscape body[data-logged-in="1"] .app-shell {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
}

.is-mobile-landscape body[data-page="log-in"] .app-shell {
    padding: 0;
    background: transparent;
}

.is-mobile-landscape .app-header,
.is-mobile-landscape .app-tab-nav {
    position: relative;
    top: auto;
}

.is-mobile-landscape .app-header {
    background: transparent;
}

.is-mobile-landscape .app-tab-nav {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.is-mobile-landscape .app-header {
    grid-row: 1;
    min-height: 48px;
    padding: 6px 11px 6px 18px;
    column-gap: 8px;
}

.is-mobile-landscape body[data-logged-in="1"] .app-header {
    grid-column: 1 / -1;
}

.is-mobile-landscape .welcome-language {
    top: max(14px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    font-size: 0.94rem;
}

.is-mobile-landscape .welcome-content {
    width: min(340px, 44vw);
    margin: 8vh 5vw 0 0;
}

.is-mobile-landscape .welcome-logo {
    width: min(270px, 84%);
    margin-bottom: 0;
}

.is-mobile-landscape .welcome-back {
    margin-bottom: 32px;
    font-size: clamp(1.35rem, 3.4vw, 1.85rem);
}

.is-mobile-landscape .welcome-back::after {
    bottom: -10px;
}

.is-mobile-landscape .welcome-login-form {
    gap: 9px;
    max-height: calc(100dvh - 180px);
    padding: 12px;
}

.is-mobile-landscape .welcome-field {
    min-height: 42px;
}

.is-mobile-landscape .welcome-field input {
    min-height: 34px;
}

.is-mobile-landscape .welcome-login-actions {
    gap: 8px;
}

.is-mobile-landscape .welcome-login-actions .primary-button,
.is-mobile-landscape .welcome-login-actions .secondary-button,
.is-mobile-landscape .welcome-password-login summary.secondary-button {
    min-height: 42px;
    font-size: 1rem;
}

.is-mobile-landscape .welcome-or {
    gap: 10px;
    font-size: 0.86rem;
}

.is-mobile-landscape .welcome-forgot-password {
    margin-top: 8px;
    font-size: 0.88rem;
}

.is-mobile-landscape .welcome-passkey-button {
    font-size: 0.86rem !important;
}

.is-mobile-landscape .welcome-passkey-button span {
    transform: scale(0.78);
}

.is-mobile-landscape .care-recipient-picker {
    margin-left: -1px;
}

.is-mobile-landscape .current-care-recipient {
    gap: 6px;
    font-size: 1.688rem;
}

.is-mobile-landscape .current-care-recipient img,
.is-mobile-landscape .brand img,
.is-mobile-landscape .icon-button,
.is-mobile-landscape .account-toggle {
    width: 33px;
    height: 33px;
}

.is-mobile-landscape .current-care-recipient span {
    min-height: 33px;
}

.is-mobile-device .sync-status {
    position: fixed;
    top: max(2px, calc((env(safe-area-inset-top) - 21px) / 2));
    left: 18px;
    width: 27px;
    height: 21px;
    transform: none;
}

.is-mobile-landscape .sync-status {
    top: max(18px, calc((env(safe-area-inset-top) - 21px) / 2 + 16px));
}

.is-mobile-portrait .sync-status {
    top: max(6px, calc((env(safe-area-inset-top) - 21px) / 2 + 4px));
    left: 14px;
}

.is-mobile-device :is(.provider-detail-modal, .document-detail-modal, .rx-detail-modal, .app-dialog-backdrop) {
    padding-top: max(18px, calc(env(safe-area-inset-top) + 8px));
}

.is-mobile-device body[data-page="schedule"] .schedule-editor-dialog {
    height: 100%;
    max-height: 100%;
}

.is-mobile-landscape .brand {
    gap: 8px;
    margin-right: 3px;
}

.is-mobile-landscape .brand strong {
    font-size: 1.86rem;
}

.is-mobile-landscape .icon-button,
.is-mobile-landscape .account-toggle {
    padding: 6px;
    border-radius: 6px;
}

.is-mobile-landscape .icon-button {
    gap: 3px;
}

.is-mobile-landscape .menu-toggle-icon {
    width: 18px;
    height: 18px;
}

.is-mobile-landscape .account-avatar {
    width: 18px;
    height: 18px;
}

.is-mobile-landscape .account-avatar::before {
    width: 6px;
    height: 6px;
    border-width: 2px;
}

.is-mobile-landscape .account-avatar::after {
    bottom: 0;
    width: 15px;
    height: 6px;
    border-width: 2px;
    border-bottom: 0;
}

.is-mobile-landscape .app-tab-nav {
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 2;
    width: 40px;
    height: 100%;
    max-width: none;
    margin-bottom: 4px;
    padding: 4px 0;
    box-shadow: none;
}

.is-mobile-device .app-tab-nav {
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    box-shadow: 0 -2px 12px rgba(28, 36, 30, 0.1);
    -webkit-backdrop-filter: blur(2px) saturate(1.08);
    backdrop-filter: blur(2px) saturate(1.08);
}

.is-mobile-landscape .app-tab-item {
    flex: 1 1 0;
    width: 100%;
    min-height: 28px;
    padding: 0;
}

.is-mobile-landscape .app-main {
    align-self: stretch;
    min-height: 0;
    overflow: hidden;
}

.is-mobile-landscape body[data-logged-in="1"] .desktop-layout-row {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    height: 100%;
}

.is-mobile-landscape .page-panel {
    min-height: 0;
    border-right: 0;
    border-left: 0;
}

.is-mobile-landscape .page-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.is-mobile-landscape .page-panel {
    padding-top: 0;
}

.is-mobile-landscape .page-title-row {
    gap: 3px;
    margin-bottom: 4px;
}

.is-mobile-landscape body[data-page="schedule"] .schedule-title-view-actions {
    margin-left: auto;
}

.is-mobile-landscape body[data-page="schedule"] .schedule-view-button svg {
    transform: none;
}

.is-mobile-landscape .page-icon {
    width: 42px;
    height: 42px;
}

.is-mobile-landscape h1 {
    font-size: clamp(0.88rem, 3.96vw, 1.18rem);
}

.is-mobile-landscape .page-title-action.primary-button,
.is-mobile-landscape .page-title-action.secondary-button,
.is-mobile-landscape .page-title-action.danger-button {
    min-height: 27px;
    padding: 5px 11px;
    border-radius: 5px;
    font-size: 0.75rem;
}

.is-mobile-landscape .page-title-action .rx-button-icon,
.is-mobile-landscape .page-title-action svg {
    width: 15px;
    height: 15px;
}

.is-mobile-landscape .app-tab-item img,
.is-mobile-landscape .app-tab-more-icon {
    display: block;
}

.is-mobile-landscape .app-tab-more-icon {
    display: inline-flex;
}

.is-mobile-landscape .app-tab-label {
    display: none;
}

.is-mobile-landscape body[data-mobile-nav="care-team"] .care-team-app-tab-nav {
    padding: 4px 0;
}

.is-mobile-landscape body[data-mobile-nav="care-team"] .care-team-app-tab-nav .app-tab-item {
    min-height: 28px;
    padding: 0;
}

.is-mobile-landscape body[data-mobile-nav="care-team"] .care-team-app-tab-nav .app-tab-item img {
    display: block;
}

.is-mobile-landscape body[data-mobile-nav="care-team"] .care-team-app-tab-nav .app-tab-label {
    display: none;
}

.is-mobile-landscape .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(88px, 107px));
    grid-auto-rows: 83px;
    gap: 7px;
}

.is-mobile-landscape body[data-page="home"] .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(87px, 106px));
    grid-auto-rows: 83px;
}

.is-mobile-landscape .home-tile {
    grid-template-rows: 43px minmax(0, 1fr);
    gap: 4px;
    height: 83px;
    padding: 7px;
}

.is-mobile-landscape .home-tile img {
    max-width: 64px;
    max-height: 43px;
}

.is-mobile-landscape body[data-page="home"] .sortable-tile {
    grid-template-rows: 46px minmax(0, 1fr);
    gap: 2px;
    height: 83px;
    padding: 5px;
}

.is-mobile-landscape body[data-page="home"] .sortable-tile img {
    max-width: 69px;
    max-height: 46px;
}

.is-mobile-landscape body[data-page="care-team-dashboard"] .care-team-dashboard-tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(87px, 106px));
    grid-auto-rows: 83px;
}

.is-mobile-landscape body[data-page="care-team-dashboard"] .care-team-dashboard-tile {
    grid-template-rows: 46px minmax(0, 1fr);
    gap: 2px;
    height: 83px;
    padding: 5px;
}

.is-mobile-landscape body[data-page="care-team-dashboard"] .care-team-dashboard-tile > img:not(.care-team-btg-badge) {
    max-width: 69px;
    max-height: 46px;
}

.is-mobile-landscape body[data-page="home"] .sortable-tile .tile-label {
    font-size: 0.79rem;
    line-height: 1.05;
    font-weight: var(--rr-weight-emphasis);
    color: var(--rr-main-color);
    -webkit-line-clamp: 2;
}

.is-mobile-landscape .tile-label {
    font-size: 0.78rem;
    line-height: 1.08;
    -webkit-line-clamp: 3;
}

.is-mobile-landscape body[data-page="care-team-dashboard"] .care-team-dashboard-tile .tile-label {
    font-size: 0.79rem;
    line-height: 1.05;
    font-weight: var(--rr-weight-emphasis);
    color: var(--rr-main-color);
    -webkit-line-clamp: 2;
}

.is-mobile-landscape .care-recipient-tile-main {
    grid-template-rows: 43px minmax(0, 1fr);
}

.is-mobile-landscape .home-tile img.care-recipient-tile-photo {
    width: 64px;
    height: 43px;
}

.is-mobile-landscape body[data-page="care-recipients"] .care-recipient-list .tile-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 134px));
    grid-auto-rows: 104px;
}

.is-mobile-landscape body[data-page="care-recipients"] .care-recipient-tile {
    height: 104px;
}

.is-mobile-landscape body[data-page="care-recipients"] .care-recipient-tile-main {
    grid-template-rows: 67.5px minmax(0, 1fr);
}

.is-mobile-landscape body[data-page="care-recipients"] .home-tile img.care-recipient-tile-photo {
    width: 100px;
    height: 67.5px;
}

.rr-companion-config {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 16px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.rr-companion-link,
.rr-companion-view-list,
.rr-companion-view-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--rr-surface-color);
}

.rr-companion-link h2 {
    margin: 0;
    color: var(--rr-main-color);
}

.rr-companion-link-heading,
.rr-companion-link-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.rr-companion-link-heading {
    display: grid;
    justify-content: stretch;
}

.rr-companion-link-actions {
    justify-content: space-between;
    width: 100%;
}

.rr-companion-url-actions,
.rr-companion-editor-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.rr-companion-page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.rr-companion-page-actions .rr-companion-url-actions {
    flex-wrap: nowrap;
}

.rr-companion-page-actions form {
    width: auto;
    margin: 0;
}

.rr-companion-editor-actions {
    margin-left: auto;
}

.rr-companion-link-actions form {
    width: auto;
    margin: 0;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-page-actions .rr-companion-url-actions {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-readonly .rr-companion-page-actions .rr-companion-url-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.is-mobile-device body[data-page="rr-companion"] .rr-companion-page-actions .rr-companion-url-actions > button,
.is-mobile-device body[data-page="rr-companion"] .rr-companion-page-actions .rr-companion-url-actions > form,
.is-mobile-device body[data-page="rr-companion"] .rr-companion-page-actions .rr-companion-url-actions > form > button {
    width: 100%;
    min-width: 0;
}

.rr-companion-link p {
    margin: 0;
    overflow-wrap: anywhere;
}

.rr-companion-view-list h2,
.rr-companion-modal-heading h2 {
    margin: 0;
    color: var(--rr-main-color);
}

.rr-companion-view-list-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rr-companion-view-list ul {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--rr-border-color);
    border-radius: 5px;
    list-style: none;
    overflow: hidden;
}

.rr-companion-view-list li {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    border-bottom: 1px solid var(--rr-border-color);
    transition: opacity 120ms ease, transform 120ms ease, background-color 120ms ease;
}

.rr-companion-view-list li:last-child {
    border-bottom: 0;
}

.rr-companion-view-list a {
    min-width: 0;
    padding: 10px 8px;
    background: transparent;
    color: var(--rr-main-color);
    text-align: left;
    font: inherit;
    font-weight: var(--rr-weight-emphasis);
    text-decoration: none;
    cursor: pointer;
}

.rr-companion-view-list li:hover,
.rr-companion-view-list li:focus-within,
.rr-companion-view-list li.is-selected {
    background: var(--color-primary-soft);
}

.rr-view-drag-handle {
    display: grid;
    place-content: center;
    width: 34px;
    height: 42px;
    padding: 7px;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    cursor: grab;
    touch-action: none;
}

.rr-view-drag-handle:active {
    cursor: grabbing;
}

.rr-view-drag-handle svg {
    width: 16px;
    height: 24px;
    fill: currentColor;
}

.rr-companion-view-list li.is-view-dragging {
    z-index: 2;
    opacity: 0.48;
    outline: 3px solid var(--rr-main-color);
    outline-offset: -3px;
    background: var(--color-primary-soft);
    transform: scale(0.985);
}

.rr-companion-view-list li.is-drop-before::before,
.rr-companion-view-list li.is-drop-after::after {
    position: absolute;
    z-index: 4;
    left: 4px;
    right: 4px;
    height: 5px;
    border-radius: 999px;
    background: var(--rr-main-color);
    content: "";
    pointer-events: none;
}

.rr-companion-view-list li.is-drop-before::before {
    top: -3px;
}

.rr-companion-view-list li.is-drop-after::after {
    bottom: -3px;
}

.rr-companion-view-list li.is-drop-before,
.rr-companion-view-list li.is-drop-after {
    background: var(--color-primary-soft);
}

body.rr-view-sort-active {
    cursor: grabbing;
    user-select: none;
}

.rr-view-list-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rr-view-action-form {
    width: auto;
    margin: 0;
}

.rr-view-list-actions button {
    display: grid;
    place-content: center;
    width: 34px;
    height: 34px;
    padding: 6px;
    border: 0;
    background: transparent;
    color: var(--rr-main-color);
    cursor: pointer;
}

.rr-view-list-actions svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.add-new {
    display: grid;
    place-content: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    cursor: pointer;
}

.add-new svg {
    display: block;
    width: 36px;
    height: 36px;
    padding: 9px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.add-new span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.add-new > span {
    display: none;
}

.floating-add-button.add-new {
    position: fixed;
    right: 40px;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 30;
    width: 72px;
    height: auto;
    min-height: 72px;
    gap: 0;
    justify-items: center;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
    touch-action: none;
    user-select: none;
    will-change: left, top;
    transform: translateZ(0);
    -webkit-tap-highlight-color: transparent;
}

.floating-add-button.add-new svg {
    width: 72px;
    height: 72px;
    padding: 18px;
    border-radius: 50%;
    background: var(--rr-main-color);
    color: var(--color-surface);
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.45);
    filter: none;
}

.floating-add-button.add-new span {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
}

.is-mobile-device .floating-add-button.add-new {
    bottom: calc(86px + env(safe-area-inset-bottom));
}

.rr-companion-modal-heading,
.rr-companion-modal-actions {
    display: none;
}

.rr-companion-editor-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

.is-desktop-device body[data-page="rr-companion"] .page-content {
    overflow: hidden;
}

.is-desktop-device body[data-page="rr-companion"] .rr-companion-config {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    align-items: start;
}

.is-desktop-device body[data-page="rr-companion"] .rr-companion-link {
    grid-column: 1;
    grid-row: 1;
}

.is-desktop-device body[data-page="rr-companion"] .rr-companion-view-list {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
}

.is-desktop-device body[data-page="rr-companion"] .rr-companion-editor-form {
    grid-column: 1;
    grid-row: 3;
    height: 100%;
}

.is-desktop-device body[data-page="rr-companion"] .rr-companion-view-card {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.rr-companion-view-card {
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    align-items: start;
}

.rr-companion-view-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-self: start;
    min-width: 0;
}

.rr-companion-view-fields label,
.rr-companion-view-fields input,
.rr-companion-view-fields select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.rr-companion-view-fields .rr-checkbox-label input[type="checkbox"] {
    width: auto;
}

.rr-companion-background-status {
    margin: 6px 0 0;
    color: var(--color-text-muted);
    font-size: var(--rr-text-sm);
}

.rr-companion-view-card > .rr-template-preview {
    width: 100%;
    align-self: start;
}

.rr-companion-modal-heading,
.rr-companion-block-fields,
.rr-companion-modal-actions {
    grid-column: 1 / -1;
}

.rr-companion-actions,
.rr-companion-view-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.rr-companion-actions {
    justify-content: flex-end;
}

.rr-companion-block-config {
    display: grid;
    gap: 8px;
    min-width: 0;
    align-self: start;
}

.is-desktop-device body[data-page="rr-companion"] .rr-companion-block-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}

.is-desktop-device body[data-page="rr-companion"] .rr-companion-block-fields.is-single-block {
    grid-template-columns: minmax(0, 1fr);
}

.rr-companion-config label {
    display: grid;
    gap: 4px;
    min-width: min(100%, 180px);
    font-weight: var(--rr-weight-label);
}

.rr-companion-config input,
.rr-companion-config select {
    font-weight: var(--rr-input-font-weight);
}

.rr-widget-config {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface-secondary);
}

.rr-widget-config summary {
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
    cursor: pointer;
}

.rr-widget-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.rr-widget-config-wide {
    grid-column: 1 / -1;
}

.rr-widget-config-field {
    display: grid;
    gap: 4px;
}

.rr-widget-config-field-label {
    color: var(--rr-text-color);
    font-weight: var(--rr-weight-label);
}

.rr-widget-config textarea {
    min-height: 160px;
    resize: vertical;
}

.rr-today-preview-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    opacity: 0;
    pointer-events: none;
}

.rr-today-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 16px;
    background: var(--color-overlay-strong);
}

.rr-today-preview-toggle:checked + .rr-today-preview-overlay {
    display: grid;
}

.rr-today-preview-dialog {
    position: relative;
    width: min(390px, calc(100vw - 32px), calc(46.2085vh - 14.7867px));
    aspect-ratio: 390 / 844;
    overflow: hidden;
    border: 1px solid var(--rr-border-color);
    border-radius: 8px;
    background: #000;
    box-shadow: var(--rr-shadow);
}

.rr-today-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--rr-border-color);
    border-radius: 50%;
    background: var(--rr-surface-color);
    color: var(--rr-main-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    text-decoration: none;
}

.is-mobile-device .rr-today-preview-overlay {
    place-items: stretch;
    padding: 0;
}

.is-mobile-device .rr-today-preview-dialog {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
}

.is-mobile-device .rr-today-preview-close {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
}

.rr-today-preview-close svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.5;
}

.rr-today-preview-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.rr-today-preview-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: top left;
}

.rr-today-preview-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--rr-background-color);
}

body.rr-today-preview-open {
    overflow: hidden;
}

.rr-checkbox-label {
    align-content: center;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 40px;
}

.rr-template-preview,
.rr-today-view {
    display: grid;
    gap: 10px;
}

.rr-template-preview {
    min-height: 180px;
    padding: 8px;
    border: 1px dashed var(--rr-border-color);
    border-radius: 8px;
    background: var(--color-surface-secondary);
}

.rr-template-preview > div,
.rr-today-block {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    border: 2px solid var(--rr-main-color);
    border-radius: 8px;
    background: var(--rr-surface-color);
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
    text-align: center;
}

.rr-template-one-full {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
}

.rr-template-two-stacked {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.rr-template-two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}

.rr-template-three-top-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.rr-template-three-top-wide > :first-child {
    grid-column: 1 / -1;
}

.rr-template-three-bottom-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.rr-template-three-bottom-wide > :last-child {
    grid-column: 1 / -1;
}

.rr-template-three-stacked {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(3, minmax(0, 1fr));
}

.rr-template-three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}

.rr-template-four-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

body.rr-today-body {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    overflow: hidden;
    background-color: var(--rr-background-color);
    background-image: var(--rr-today-background-image, none);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.rr-today-screen {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 12px;
    gap: 12px;
}

.rr-today-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    color: var(--rr-main-color);
    font-size: clamp(1.1rem, 3vw, 2rem);
    font-weight: var(--rr-weight-emphasis);
}

.rr-today-header div {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.rr-today-header img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.rr-today-views,
.rr-today-view {
    min-width: 0;
    min-height: 0;
}

.rr-today-views {
    width: 100%;
    height: 100%;
}

.rr-today-view {
    width: 100%;
    height: 100%;
}

.rr-widget-placeholder {
    padding: 14px;
    color: var(--color-text-muted);
    font-size: clamp(1.4rem, 4vw, 3rem);
}

.rr-widget-placeholder > .rr-widget-container {
    display: grid;
    place-items: center;
}

.rr-clock-widget {
    display: grid;
    place-items: center;
    align-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: clamp(12px, 3vw, 36px);
    overflow: hidden;
    background: var(--rr-clock-bg);
    color: var(--rr-clock-text);
    /* Companion widgets are user-configurable display content, not standard UI text. */
    font-family: var(--rr-clock-font);
    font-weight: var(--rr-clock-weight);
}

.rr-clock-digital {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.18em;
    max-width: 100%;
    font-size: clamp(2rem, var(--rr-clock-size), 18vw);
    line-height: 1;
    text-align: center;
}

.rr-clock-digital,
.rr-clock-date {
    width: fit-content;
    height: auto;
    padding: 0.35em 0.55em;
}

.rr-clock-analog-panel {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: clamp(8px, 1.5vw, 18px);
}

.rr-clock-suffix {
    font-size: 0.36em;
    line-height: 1;
}

.rr-clock-date {
    margin-top: 0.45em;
    font-size: clamp(1rem, calc(var(--rr-clock-size) * 0.32), 6vw);
    line-height: 1.2;
    text-align: center;
}

.rr-clock-analog {
    position: relative;
    container-type: inline-size;
    width: min(72vmin, 72%);
    max-width: 360px;
    aspect-ratio: 1;
    border: clamp(5px, 1vw, 10px) solid currentColor;
    border-radius: 50%;
    background: color-mix(in srgb, var(--rr-clock-bg) 88%, var(--rr-clock-text));
}

.rr-clock-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 4px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: bottom center;
}

.rr-clock-number {
    position: absolute;
    display: grid;
    place-items: center;
    width: 1.6em;
    height: 1.6em;
    color: currentColor;
    font-size: clamp(0.8rem, 14cqw, 3.5rem);
    font-weight: var(--rr-clock-weight);
    line-height: 1;
    transform: translate(-50%, -50%);
}

.rr-clock-number-12 {
    left: 50%;
    top: 10%;
}

.rr-clock-number-1 {
    left: 70%;
    top: 15.4%;
}

.rr-clock-number-2 {
    left: 84.6%;
    top: 30%;
}

.rr-clock-number-3 {
    left: 90%;
    top: 50%;
}

.rr-clock-number-4 {
    left: 84.6%;
    top: 70%;
}

.rr-clock-number-5 {
    left: 70%;
    top: 84.6%;
}

.rr-clock-number-6 {
    left: 50%;
    top: 90%;
}

.rr-clock-number-7 {
    left: 30%;
    top: 84.6%;
}

.rr-clock-number-8 {
    left: 15.4%;
    top: 70%;
}

.rr-clock-number-9 {
    left: 10%;
    top: 50%;
}

.rr-clock-number-10 {
    left: 15.4%;
    top: 30%;
}

.rr-clock-number-11 {
    left: 30%;
    top: 15.4%;
}

.rr-clock-hour {
    height: 28%;
    width: 7px;
}

.rr-clock-minute {
    height: 38%;
    width: 5px;
}

.rr-clock-second {
    height: 42%;
    width: 2px;
    opacity: 0.75;
}

.rr-clock-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.rr-clock-mode-both {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: clamp(10px, 2vw, 20px);
}

.rr-clock-mode-both .rr-clock-analog {
    width: min(48vmin, 56%);
}

.rr-date-widget {
    display: grid;
    place-items: center;
    align-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: clamp(14px, 4vw, 48px);
    gap: clamp(14px, 3vw, 30px);
    overflow: hidden;
    background: var(--rr-date-bg);
    color: var(--rr-date-text);
    /* Companion widgets are user-configurable display content, not standard UI text. */
    font-family: var(--rr-date-font);
    font-weight: var(--rr-date-weight);
}

.rr-date-value,
.rr-date-time-panel,
.rr-date-analog-panel {
    width: fit-content;
    height: auto;
    padding: 0.35em 0.55em;
}

.rr-date-analog-panel {
    display: grid;
    place-items: center;
}

.rr-date-value {
    display: grid;
    max-width: 100%;
    font-size: clamp(2rem, var(--rr-date-size), 15vw);
    line-height: 2;
    text-align: center;
    text-wrap: balance;
}

.rr-date-value span {
    display: block;
}

.rr-date-time {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.18em;
    max-width: 100%;
    font-size: clamp(1.3rem, calc(var(--rr-date-size) * 0.42), 6vw);
    line-height: 1;
    text-align: center;
}

.rr-date-suffix {
    font-size: 0.55em;
}

.rr-date-analog {
    width: min(30vmin, 180px);
}

.rr-date-time-both {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 3vw, 28px);
    max-width: 100%;
}

.rr-date-time-both .rr-date-time {
    font-size: clamp(1.2rem, calc(var(--rr-date-size) * 0.34), 5vw);
}

.rr-custom-widget {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    place-items: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: clamp(18px, 5vw, 64px);
    overflow: hidden;
    background:
        linear-gradient(115deg, rgb(255 250 238 / 0.86), rgb(246 218 198 / 0.56) 48%, rgb(209 226 207 / 0.48)),
        linear-gradient(180deg, rgb(255 255 255 / 0.42), rgb(112 68 41 / 0.1)),
        url("/system/images/rr-plan-warm-texture.png"),
        #F8E9D8;
    background-position: center;
    background-size: cover;
    color: var(--rr-custom-text);
    /* Companion widgets are user-configurable display content, not standard UI text. */
    font-family: var(--rr-custom-font);
    text-align: center;
}

.rr-custom-widget::before {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 14%, rgb(255 255 255 / 0.38) 0 10%, transparent 32%),
        radial-gradient(circle at 84% 82%, rgb(255 244 224 / 0.28) 0 12%, transparent 34%),
        linear-gradient(90deg, rgb(255 255 255 / 0.14) 0 1px, transparent 1px),
        linear-gradient(0deg, rgb(122 74 44 / 0.07) 0 1px, transparent 1px);
    background-size: auto, auto, 3.8em 3.8em, 3.8em 3.8em;
    content: "";
    opacity: 0.44;
    pointer-events: none;
}

.rr-custom-widget::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0 55%, rgb(112 68 41 / 0.1));
    content: "";
    pointer-events: none;
}

.rr-custom-message {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.35em;
    max-width: min(18em, 100%);
    font-size: clamp(1.2rem, var(--rr-custom-size), 12vw);
    font-weight: var(--rr-custom-weight);
    line-height: 1.08;
    text-wrap: balance;
}

.rr-custom-message.rr-widget-container {
    width: auto;
    height: auto;
    padding: 0.45em 0.65em;
}

.rr-custom-message > *,
.rr-custom-message p,
.rr-custom-message div,
.rr-custom-message h1,
.rr-custom-message h2,
.rr-custom-message h3 {
    margin: 0;
}

.rr-custom-message h1,
.rr-custom-message h2,
.rr-custom-message h3 {
    color: currentColor;
    font: inherit;
    line-height: 1.02;
}

.rr-custom-message ul,
.rr-custom-message ol {
    display: inline-grid;
    gap: 0.22em;
    justify-self: center;
    padding-left: 1.2em;
    text-align: left;
}

.rr-custom-date {
    position: relative;
    z-index: 1;
    align-self: end;
    margin-top: 1em;
    padding: 0.35em 0.75em;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.42);
    backdrop-filter: blur(5px);
    font-size: clamp(1rem, calc(var(--rr-custom-size) * 0.28), 4vw);
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.2;
}

.rr-plan-widget {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background:
        linear-gradient(115deg, rgb(255 250 238 / 0.88), rgb(246 218 198 / 0.58) 48%, rgb(209 226 207 / 0.5)),
        linear-gradient(180deg, rgb(255 255 255 / 0.48), rgb(112 68 41 / 0.12)),
        url("/system/images/rr-plan-warm-texture.png"),
        #F8E9D8;
    background-position: center;
    background-size: cover;
    color: var(--rr-plan-text);
    /* Companion widgets are user-configurable display content, not standard UI text. */
    font-family: var(--rr-plan-font);
    font-size: clamp(1rem, var(--rr-plan-size), 6vw);
    font-weight: var(--rr-plan-weight);
    text-align: left;
}

.rr-plan-widget::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgb(255 255 255 / 0.16) 0 1px, transparent 1px),
        linear-gradient(0deg, rgb(122 74 44 / 0.08) 0 1px, transparent 1px),
        radial-gradient(circle at 12% 8%, rgb(255 255 255 / 0.38) 0 10%, transparent 30%),
        linear-gradient(135deg, rgb(255 255 255 / 0.24), transparent 46%);
    background-size: 3.8em 3.8em, 3.8em 3.8em, auto, auto;
    content: "";
    opacity: 0.42;
    pointer-events: none;
}

.rr-plan-widget::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0 58%, color-mix(in srgb, currentColor 8%, transparent)),
        linear-gradient(90deg, currentColor, color-mix(in srgb, currentColor 14%, transparent)) left bottom / 100% 0.32em no-repeat;
    content: "";
    opacity: 0.58;
    pointer-events: none;
}

.rr-plan-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(14px, 3vw, 30px);
    border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    background: rgb(255 248 235 / 0.72);
    backdrop-filter: blur(8px) saturate(1.05);
    box-shadow: 0 0.35em 1.2em color-mix(in srgb, currentColor 9%, transparent);
}

.rr-plan-title-wrap {
    display: grid;
    gap: 0.16em;
}

.rr-plan-kicker,
.rr-plan-count {
    width: fit-content;
    border: 1px solid color-mix(in srgb, currentColor 26%, transparent);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.44);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rr-plan-kicker {
    padding: 0.22em 0.58em;
    font-size: 0.44em;
    font-weight: var(--rr-weight-emphasis);
}

.rr-plan-count {
    margin-top: 0.2em;
    padding: 0.2em 0.56em;
    font-size: 0.48em;
    font-weight: var(--rr-weight-emphasis);
    opacity: 0.82;
}

.rr-plan-header h2 {
    margin: 0;
    color: currentColor;
    font: inherit;
    font-size: 1.22em;
    line-height: 1.02;
}

.rr-plan-date {
    margin-top: 0.18em;
    font-size: 1.36em;
    line-height: 1.2;
    opacity: 0.86;
}

.rr-plan-time {
    display: grid;
    flex: 0 0 auto;
    justify-items: center;
    gap: 0.28em;
    padding: 0.42em 0.5em;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    border-radius: 0.8em;
    background: rgb(255 255 255 / 0.42);
    backdrop-filter: blur(5px);
    box-shadow: inset 0 1px 0 color-mix(in srgb, currentColor 18%, transparent);
}

.rr-plan-time-prompt {
    font-size: 0.42em;
    font-weight: var(--rr-weight-emphasis);
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-transform: uppercase;
}

.rr-plan-current-time {
    white-space: nowrap;
    font-size: 0.78em;
    font-weight: var(--rr-weight-emphasis);
}

.rr-plan-clock {
    position: relative;
    width: 2.4em;
    aspect-ratio: 1;
    border: 0.12em solid currentColor;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgb(255 248 235 / 0.72) 0 48%, transparent 49%),
        color-mix(in srgb, currentColor 10%, transparent);
    box-shadow: inset 0 0 0 0.16em color-mix(in srgb, var(--rr-plan-bg) 80%, transparent);
}

.rr-plan-hour,
.rr-plan-minute,
.rr-plan-second {
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 0.09em;
    border-radius: 999px;
    background: currentColor;
    transform-origin: bottom center;
}

.rr-plan-hour {
    height: 27%;
}

.rr-plan-minute {
    height: 38%;
    width: 0.06em;
}

.rr-plan-second {
    height: 43%;
    width: 0.035em;
    background: var(--color-accent);
}

.rr-plan-clock-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.24em;
    aspect-ratio: 1;
    border-radius: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.rr-plan-events {
    position: relative;
    z-index: 1;
    min-height: 0;
    padding: clamp(12px, 2.2vw, 26px);
    overflow-y: auto;
}

.rr-plan-nav {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin: 8px clamp(12px, 2.2vw, 26px) 16px;
}

.rr-plan-nav.rr-widget-container {
    border-color: transparent;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.rr-plan-nav button {
    min-height: 68px;
    padding: 10px 24px;
    border: 1px solid color-mix(in srgb, currentColor 26%, transparent);
    border-radius: 6px;
    background: rgb(255 255 255 / 0.58);
    color: currentColor;
    font: inherit;
    font-size: 0.72em;
    white-space: nowrap;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.1;
}

.rr-plan-nav button svg {
    width: 1.7em;
    height: 1.7em;
    fill: none;
    stroke: currentColor;
    stroke-width: 3.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rr-plan-nav button img {
    display: block;
    width: 2em;
    height: 2em;
    object-fit: contain;
    transform: scale(2);
}

.rr-rx-challenge-dialog {
    width: min(440px, 100%);
}

.rr-rx-challenge-dialog form {
    display: grid;
    gap: 8px;
}

.rr-rx-challenge-fields {
    margin: 0;
    padding: 0;
    border: 0;
}

.rr-rx-challenge-fields legend {
    margin-bottom: 8px;
}

.rr-rx-challenge-pin {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.rr-rx-challenge-pin input {
    width: 3rem;
    height: 3rem;
    padding: 4px;
    text-align: center;
    font-size: 1.5rem;
}

.rr-plan-nav button:first-child {
    justify-self: start;
}

.rr-plan-nav button:nth-child(2) {
    justify-self: center;
    border-color: transparent;
    background: transparent;
}

.rr-plan-nav button[data-rr-plan-rx] {
    justify-self: center;
    border-color: transparent;
    background: transparent;
}

.rr-plan-nav:has(button[data-rr-plan-rx]:not([hidden])) {
    grid-template-columns: 1fr auto auto 1fr;
}

.rr-plan-nav button:last-child {
    justify-self: end;
}

.rr-plan-nav button:first-child,
.rr-plan-nav button:last-child {
    width: 68px;
    min-width: 68px;
    height: 68px;
    padding: 0;
    border-radius: 50%;
}

.rr-plan-event {
    position: relative;
    display: grid;
    grid-template-columns: minmax(5.8em, auto) minmax(0, 1fr);
    gap: 0.78em;
    margin-bottom: 0.48em;
    padding: 0.58em 0.7em 0.58em 1em;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 0.72em;
    background: rgb(255 252 244 / 0.64);
    backdrop-filter: blur(6px) saturate(1.04);
    box-shadow: 0 0.28em 0.9em color-mix(in srgb, currentColor 8%, transparent);
}

.rr-plan-event::before {
    position: absolute;
    left: 0.42em;
    top: 0.72em;
    bottom: 0.72em;
    width: 0.2em;
    border-radius: 999px;
    background: currentColor;
    content: "";
    opacity: 0.62;
}

.rr-plan-event:last-child {
    margin-bottom: 0;
}

.rr-plan-event-time {
    align-self: start;
    padding: 0.22em 0.42em;
    border-radius: 0.5em;
    background: rgb(255 255 255 / 0.46);
    font-size: 0.72em;
    font-weight: var(--rr-weight-emphasis);
    white-space: nowrap;
}

.rr-plan-event-details h3,
.rr-plan-event-details p,
.rr-plan-empty {
    margin: 0;
    color: currentColor;
    font: inherit;
}

.rr-plan-event-details h3 {
    font-weight: inherit;
    line-height: 1.12;
}

.rr-plan-event-details p {
    margin-top: 0.2em;
    font-size: 0.72em;
    font-weight: var(--rr-weight-regular);
    line-height: 1.3;
}

.rr-plan-empty {
    display: grid;
    min-height: 100%;
    place-items: center;
    padding: 1em;
    border: 1px dashed color-mix(in srgb, currentColor 34%, transparent);
    border-radius: 0.9em;
    background: rgb(255 252 244 / 0.58);
    backdrop-filter: blur(6px);
    text-align: center;
}

.rr-today-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.rr-today-controls button {
    min-width: 140px;
    min-height: 56px;
    border: 0;
    border-radius: 8px;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-size: 1.2rem;
    font-weight: var(--rr-weight-emphasis);
}

.technology-app {
    display: grid;
    gap: 12px;
}

.technology-toolbar,
.technology-tabs,
.technology-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.technology-search {
    flex: 1 1 220px;
}

.technology-search input {
    width: 100%;
}

.technology-tabs {
    border-bottom: 1px solid var(--color-border);
}

.technology-tab {
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-weight: var(--rr-weight-emphasis);
}

.technology-tab.is-active {
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.technology-dashboard,
.technology-emergency {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.technology-summary {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
}

.technology-summary h2 {
    margin: 0 0 4px;
    color: var(--rr-main-color);
    font-size: 1rem;
}

.technology-summary p {
    margin: 0;
}

.technology-summary button,
.technology-summary article {
    display: grid;
    gap: 3px;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--rr-background-color);
    color: var(--color-text);
    text-align: left;
}

.technology-summary span {
    display: block;
    font-size: 0.92rem;
}

.technology-card {
    grid-template-columns: minmax(0, 1fr) auto;
    cursor: pointer;
}

.technology-form {
    margin-top: 8px;
}

.technology-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.technology-details {
    margin-top: 10px;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
}

.technology-details summary {
    cursor: pointer;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
}

.technology-checkbox {
    align-self: center;
}

.technology-emergency-shortcut {
    min-height: 56px;
}

.rr-technology-widget {
    display: grid;
    align-content: center;
    gap: 0.45em;
    width: 100%;
    height: 100%;
    padding: 1em;
    background: var(--color-surface);
    color: var(--rr-text-color);
    font: inherit;
    text-align: center;
}

.rr-technology-widget > .rr-widget-container {
    display: grid;
    align-content: center;
    gap: 0.45em;
    width: 100%;
    height: auto;
    padding: 0.75em;
}

.rr-technology-widget h2 {
    margin: 0;
    color: var(--rr-main-color);
    font-size: 1em;
}

.rr-technology-widget ul {
    display: grid;
    gap: 0.28em;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rr-technology-widget p {
    margin: 0;
}

body.rr-today-body .rr-today-block {
    overflow: hidden;
    border: 0;
    background: transparent;
}

.rr-widget-surface {
    display: grid;
    place-items: stretch;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: transparent;
}

.rr-widget-container {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: var(--rr-widget-border-width) solid var(--rr-widget-border-color);
    border-radius: 8px;
    background: color-mix(in srgb, var(--rr-widget-background) var(--rr-widget-background-opacity), transparent);
    -webkit-backdrop-filter: blur(var(--rr-widget-blur));
    backdrop-filter: blur(var(--rr-widget-blur));
}

body.rr-today-body .rr-widget-surface > :is(
    .rr-clock-widget,
    .rr-date-widget,
    .rr-custom-widget,
    .rr-plan-widget,
    .rr-technology-widget,
    .rr-widget-placeholder
) {
    width: 100%;
    height: 100%;
    background: transparent;
}

body.rr-today-body .rr-widget-surface > .rr-custom-widget::before,
body.rr-today-body .rr-widget-surface > .rr-custom-widget::after,
body.rr-today-body .rr-widget-surface > .rr-plan-widget::before,
body.rr-today-body .rr-widget-surface > .rr-plan-widget::after {
    display: none;
}

.btg-panel {
    display: grid;
    gap: 12px;
    max-width: 720px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
}

.btg-panel h2,
.btg-panel p {
    margin: 0;
}

.btg-panel h2 {
    color: var(--rr-main-color);
}

.btg-panel .btg-emergency-heading {
    color: #b00020;
    font-weight: var(--rr-weight-emphasis);
}

.app-dialog .btg-launch-dialog-title {
    color: #b00020;
    font-weight: var(--rr-weight-emphasis);
}

.btg-form {
    display: grid;
    gap: 10px;
}

.btg-actions {
    gap: 18px;
}

.btg-grant-button {
    gap: 8px;
    border-color: #b00020;
    background: #b00020;
}

.btg-grant-button:focus,
.btg-grant-button:focus-visible {
    outline: 4px solid #111;
    outline-offset: 3px;
    box-shadow: 0 0 0 7px #fff;
}

.btg-grant-button img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.btg-form label {
    display: grid;
    gap: 5px;
    font-weight: var(--rr-weight-label);
}

.btg-form textarea {
    width: 100%;
    resize: vertical;
}

.btg-form textarea::placeholder {
    color: color-mix(in srgb, currentColor 33%, transparent);
    opacity: 1;
}

.schedule-readonly-note {
    margin: 0 auto 0 0;
    color: var(--color-muted);
    font-weight: var(--rr-weight-emphasis);
}

.care-team-app {
    display: grid;
    gap: 14px;
}

body[data-page="care-team-dashboard"] .page-content {
    display: flex;
    overflow: hidden;
}

.is-mobile-device body[data-page="care-team-dashboard"] .page-content {
    padding-bottom: 0;
}

body[data-page="care-team-dashboard"] .care-team-app {
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.is-mobile-device body[data-page="care-team-dashboard"] .page-panel {
    padding-bottom: 0;
}

.care-team-dashboard-static-top {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.care-team-dashboard-search,
.care-team-dashboard-search input {
    display: block;
    width: 100%;
    min-width: 0;
}

.care-team-dashboard-search {
    width: calc(100% - 32px);
    margin-top: 4px;
    margin-right: 16px;
    margin-bottom: 4px;
    margin-left: 16px;
}

.care-team-dashboard-search input {
    min-height: 42px;
}

.care-team-dashboard-scroll {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-dashboard-scroll,
.is-mobile-device body[data-page="care-team-dashboard"] .care-team-dashboard-column {
    grid-template-rows: none;
    align-content: start;
    height: auto;
    max-height: 100%;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-dashboard-scroll {
    align-self: stretch;
    height: 100%;
    padding-right: 8px;
    padding-left: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-dashboard-scroll .care-team-section,
.is-mobile-device body[data-page="care-team-dashboard"] .care-team-dashboard-scroll .care-team-next {
    grid-template-rows: auto minmax(0, 1fr);
    height: auto;
    max-height: 100%;
    min-height: 0;
    overflow: visible;
}

.is-mobile-device body[data-page="care-team-dashboard"] [data-care-team-unclaimed-list],
.is-mobile-device body[data-page="care-team-dashboard"] [data-care-team-assigned-list],
.is-mobile-device body[data-page="care-team-dashboard"] [data-care-team-next-list],
.is-mobile-device body[data-page="care-team-dashboard"] [data-care-team-others-list] {
    min-height: 0;
    overflow: visible;
}

.is-desktop-device body[data-page="care-team-dashboard"] .care-team-dashboard-scroll {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: stretch;
    align-items: start;
    overflow: hidden;
}

.is-desktop-device body[data-page="care-team-dashboard"] .care-team-dashboard-scroll.is-filtered {
    grid-template-columns: minmax(0, 1fr);
}

.is-desktop-device body[data-page="care-team-dashboard"] .care-team-dashboard-column > .care-team-section,
.is-desktop-device body[data-page="care-team-dashboard"] .care-team-dashboard-column > .care-team-next {
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.is-desktop-device body[data-page="care-team-dashboard"] [data-care-team-unclaimed-list],
.is-desktop-device body[data-page="care-team-dashboard"] [data-care-team-assigned-list],
.is-desktop-device body[data-page="care-team-dashboard"] [data-care-team-next-list],
.is-desktop-device body[data-page="care-team-dashboard"] [data-care-team-others-list] {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.care-team-dashboard-column {
    display: grid;
    gap: 14px;
    min-width: 0;
    min-height: 0;
}

.is-desktop-device body[data-page="care-team-dashboard"] .care-team-dashboard-column {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.is-desktop-device body[data-page="care-team-dashboard"] .care-team-dashboard-column > .care-team-section,
.is-desktop-device body[data-page="care-team-dashboard"] .care-team-dashboard-column > .care-team-next {
    flex: 1 1 0;
    max-height: none;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-tile-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    padding: 2px 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-dashboard-tile-grid {
    display: none;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-tile {
    flex: 0 0 106px;
    grid-template-rows: 46px minmax(0, 1fr);
    gap: 2px;
    width: 106px;
    height: 83px;
    padding: 5px;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-tile > img:not(.care-team-btg-badge) {
    max-width: 69px;
    max-height: 46px;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-tile .tile-label {
    font-size: 0.79rem;
    line-height: 1.05;
    -webkit-line-clamp: 2;
}

.request-central-widget-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, 160px);
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.request-central-nav-tile {
    width: 160px;
}

.request-central-subpage-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 2px 2px 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.request-central-subpage-nav-tile {
    flex: 0 0 92px;
    grid-template-rows: 36px minmax(0, 1fr);
    gap: 2px;
    width: 92px;
    height: 76px;
    padding: 5px;
    font-size: 0.72rem;
    line-height: 1.1;
}

.request-central-subpage-nav-tile img {
    width: 48px;
    height: 34px;
    object-fit: contain;
}

.request-central-subpage-nav-tile .tile-label {
    font-size: 0.7rem;
    line-height: 1.05;
    -webkit-line-clamp: 2;
}

.request-central-subpage-nav-tile.is-current {
    border-color: var(--rr-main-color);
    background: var(--rr-background-color);
    background: color-mix(in srgb, var(--rr-main-color) 12%, white);
}

.care-team-status {
    min-height: 1.4em;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
}

.care-team-status[data-status-type="error"] {
    border-color: #9b1c1c;
    color: #9b1c1c;
}

.care-team-status[data-status-type="synced"] {
    border-color: color-mix(in srgb, var(--rr-main-color) 55%, var(--color-border));
}

.care-team-overview {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.care-team-opportunities {
    min-width: 0;
    margin: 0;
    padding: 10px 12px 12px;
    border: 1px solid color-mix(in srgb, var(--rr-main-color) 32%, var(--color-border));
    border-radius: 6px;
    background: transparent;
}

.care-team-opportunities legend {
    padding: 0 8px;
    color: var(--rr-main-color);
    font-weight: 700;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-opportunities {
    padding: 0;
    border: 0;
    border-radius: 0;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-opportunities legend {
    display: none;
}

.care-team-metric,
.care-team-next,
.care-team-section,
.care-team-invitation-response {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
}

.care-team-metric {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 82px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
}

.care-team-metric:hover,
.care-team-metric:focus-visible,
.care-team-metric.is-active {
    background: var(--color-primary-soft);
    outline: none;
}

.is-desktop-device .care-team-metric {
    cursor: default;
}

.is-desktop-device .care-team-metric:hover,
.is-desktop-device .care-team-metric:focus-visible,
.is-desktop-device .care-team-metric.is-active {
    background: var(--color-surface);
}

.is-desktop-device .care-team-metric[data-care-team-completed-widget] {
    cursor: pointer;
}

.is-desktop-device .care-team-metric[data-care-team-completed-widget]:hover,
.is-desktop-device .care-team-metric[data-care-team-completed-widget]:focus-visible {
    background: var(--color-primary-soft);
}

.care-team-metric strong {
    color: var(--rr-main-color);
    font-size: 2rem;
    line-height: 1;
}

.care-team-metric span {
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: var(--rr-weight-emphasis);
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-metric {
    justify-self: center;
    width: 100%;
    min-height: 61.5px;
    padding: 7.5px;
    -webkit-tap-highlight-color: transparent;
}

.is-mobile-portrait body[data-page="care-team-dashboard"] .care-team-metric {
    align-content: start;
    width: calc(100% - 2px);
    min-height: 59.5px;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-metric:hover,
.is-mobile-device body[data-page="care-team-dashboard"] .care-team-metric:focus-visible,
.is-mobile-device body[data-page="care-team-dashboard"] .care-team-metric.is-active {
    background: var(--color-surface);
    outline: none;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-overview {
    grid-template-columns: repeat(5, 20%);
    justify-content: space-evenly;
    gap: 0;
}

.is-mobile-portrait body[data-page="care-team-dashboard"] .care-team-overview {
    width: calc(100% - 4px);
    margin-right: 2px;
    margin-left: 2px;
}

.care-team-completed-dialog {
    display: flex;
    flex-direction: column;
    width: min(620px, 100%);
    height: min(82dvh, 720px);
    max-height: min(82dvh, 720px);
    overflow: hidden;
}

.care-team-completed-dialog > h3 {
    flex: 0 0 auto;
    margin: -18px -18px 16px;
    padding: 10px 18px;
    border-radius: 7px 7px 0 0;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-size: 1.17rem;
    line-height: 1.2;
}

.care-team-completed-list {
    display: grid;
    flex: 1 1 auto;
    align-content: start;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
}

body[data-page="care-team-dashboard"] .care-team-completed-list.care-team-detail dl {
    grid-template-columns: max-content minmax(0, 1fr);
}

body[data-page="care-team-dashboard"] .care-team-completed-list.care-team-detail dt {
    text-align: right;
}

body[data-page="care-team-dashboard"] .care-team-completed-list.care-team-detail dd {
    text-align: left;
}

.care-team-completed-toolbar {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-start;
    padding-bottom: 10px;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-metric strong {
    font-size: 1.5rem;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-metric span {
    margin-top: 4.5px;
    font-size: 0.675rem;
}

.care-team-next,
.care-team-section,
.care-team-invitation-response {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.care-team-next {
    align-content: start;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-scroll .care-team-section,
body[data-page="care-team-dashboard"] .care-team-dashboard-scroll .care-team-next {
    align-content: start;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-scroll .care-team-row {
    margin-bottom: 8px;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-scroll .care-team-row strong {
    font-size: 1.25em;
    font-weight: 700;
}

.care-team-next h2,
.care-team-section h2,
.care-team-invitation-response h2 {
    margin: 0;
    color: var(--rr-main-color);
    font-size: 1.05rem;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-scroll h2 {
    width: calc(100% + 24px);
    margin: -12px -12px 0;
    padding: 8px 12px;
    border-radius: 5px 5px 0 0;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-weight: 700;
}

.care-team-invitation-response p {
    margin: 0;
}

.care-team-toolbar {
    display: flex;
    justify-content: flex-end;
}

.care-team-inline-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) auto auto;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--rr-background-color);
}

.care-team-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) auto;
    gap: 8px;
    align-items: end;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
}

.care-team-inline-form label {
    display: grid;
    gap: 4px;
    font-weight: var(--rr-weight-label);
}

.care-team-member-form-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 8px;
}

.care-team-preferences-actions {
    display: flex;
    gap: 8px;
}

.care-team-preferences-actions .primary-button,
.care-team-preferences-actions .secondary-button {
    min-width: 150px;
}

.care-team-member-form-actions .primary-button,
.care-team-member-form-actions .secondary-button {
    width: auto;
}

.care-team-member-form [data-care-team-member-status] {
    grid-column: 1 / -1;
    margin: 0;
}

.care-team-need-type-form {
    display: grid;
    gap: 16px;
}

.care-team-need-type-form label {
    display: grid;
    gap: 4px;
}

.care-team-need-type-dialog {
    width: min(420px, 100%);
}

.care-team-need-type-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.care-team-need-type-form [data-care-team-need-type-submit]:focus {
    outline: 3px solid var(--color-surface);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--rr-main-color);
}

.care-group-access,
.care-group-form-actions {
    grid-column: 1 / -1;
}

.care-group-details-form {
    grid-template-columns: minmax(240px, 0.75fr) minmax(540px, 1.5fr);
    align-items: start;
}

.care-group-details-fields {
    display: grid;
    gap: 12px;
}

.care-group-details-fields > label {
    display: grid;
    gap: 4px;
}

.care-group-access {
    display: grid;
    gap: 8px;
    grid-column: auto;
}

.care-group-access h3 {
    margin: 8px 0 0;
    color: var(--rr-main-color);
}

.care-group-access-table-wrap {
    min-height: 0;
    overflow: hidden;
}

.care-group-access table {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
}

.care-group-access thead {
    flex: 0 0 auto;
}

.care-group-access tbody {
    display: block;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.care-group-access tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.care-group-access th:first-child,
.care-group-access td:first-child {
    width: 35%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.care-group-access th,
.care-group-access td {
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

.care-group-access thead th {
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.care-group-access-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0;
    padding: 0;
    border: 0;
}

.care-group-access-options label {
    display: inline-flex;
    grid-template-columns: none;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    white-space: normal;
}

.schedule-visibility table {
    display: table;
    height: auto;
    table-layout: auto;
}

.schedule-visibility thead {
    display: table-header-group;
}

.schedule-visibility tbody {
    display: table-row-group;
    overflow: visible;
}

.schedule-visibility tr {
    display: table-row;
    width: auto;
    table-layout: auto;
}

.schedule-visibility th:first-child,
.schedule-visibility td:first-child {
    width: auto;
}

.schedule-visibility th:last-child,
.schedule-visibility td:last-child {
    width: 1%;
    white-space: nowrap;
}

.schedule-visibility thead th:last-child {
    text-align: center;
}

.is-mobile-device .schedule-visibility thead th {
    font-size: var(--rr-text-sm);
    font-weight: var(--rr-weight-regular);
}

.is-mobile-device .schedule-visibility tbody th,
.is-mobile-device .schedule-visibility tbody td {
    font-weight: var(--rr-weight-regular);
}

.schedule-visibility .care-group-access-options {
    flex-wrap: nowrap;
}

.schedule-visibility .care-group-access-options label {
    white-space: nowrap;
}

.care-group-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.care-group-form-actions .primary-button,
.care-group-form-actions .secondary-button {
    width: auto;
    align-self: auto;
}

.care-group-editor-dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(1000px, 100%);
    height: min(800px, 100%);
    max-height: 100%;
    overflow: hidden;
}

.care-group-editor-dialog .care-group-details-form,
.care-group-editor-dialog .care-group-access,
.care-group-editor-dialog .care-group-access-table-wrap {
    height: 100%;
    min-height: 0;
}

.care-group-editor-dialog .care-group-details-form {
    overflow: hidden;
}

.care-group-editor-dialog .care-group-access {
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.is-desktop-device .care-group-details-form {
    grid-template-rows: auto minmax(0, 1fr);
}

.is-desktop-device .care-group-access {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .care-group-details-form {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }
}

.care-team-filters label {
    display: grid;
    gap: 4px;
    font-weight: var(--rr-weight-label);
}

.care-team-inline-form input:not([type="checkbox"]):not([type="radio"]),
.care-team-inline-form select,
.care-team-inline-form textarea,
.care-team-filters input,
.care-team-filters select {
    width: 100%;
}

.is-mobile-device body[data-page="care-groups"] .care-group-editor-backdrop {
    padding: 8px;
}

.is-mobile-device body[data-page="care-groups"] .care-group-editor-dialog {
    padding: 12px;
}

.is-mobile-device body[data-page="care-groups"] .care-group-access-options {
    flex-direction: column;
    align-items: flex-start;
}

.is-mobile-device body[data-page="care-groups"] .care-group-access-options label {
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
}

.care-team-inline-form textarea {
    resize: vertical;
}

.care-team-wide-field {
    grid-column: 1 / -1;
}

.care-team-group-choices {
    display: grid;
    grid-column: 1 / -1;
    gap: 6px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.care-team-group-choices legend {
    padding: 0 4px;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-label);
}

.care-team-group-choices > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.care-team-checkbox {
    width: auto;
    min-height: 0;
    align-items: center;
    line-height: normal;
}

.care-team-checkbox > span {
    line-height: normal;
}

.care-team-checkbox-newline {
    flex-basis: 100%;
}

.care-team-list {
    display: grid;
    gap: 8px;
}

.care-team-detail {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--rr-background-color);
}

.care-team-detail h3,
.care-team-detail h4,
.care-team-detail p {
    margin: 0;
}

.care-team-detail h3,
.care-team-detail h4 {
    color: var(--rr-main-color);
}

.care-team-detail dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 10px;
    margin: 0;
}

.care-team-detail dt {
    font-weight: var(--rr-weight-emphasis);
}

.care-team-detail dd {
    margin: 0;
}

.care-team-detail a {
    color: var(--rr-main-color);
    overflow-wrap: anywhere;
}

.care-team-dashboard-detail-dialog {
    display: flex;
    flex-direction: column;
    width: min(640px, 100%);
    height: min(640px, calc(100dvh - 36px));
    max-height: calc(100dvh - 36px);
    overflow: hidden;
}

.care-team-dashboard-detail-dialog > h3 {
    flex: 0 0 auto;
    margin: -18px -18px 16px;
    padding: 10px 18px;
    border-radius: 7px 7px 0 0;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-size: 1.17rem;
    line-height: 1.2;
}

.care-team-dashboard-detail-dialog .care-team-detail {
    flex: 1 1 auto;
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-detail-dialog .care-team-detail dl {
    grid-template-columns: max-content minmax(0, 1fr);
}

body[data-page="care-team-dashboard"] .care-team-dashboard-detail-dialog .care-team-detail dt {
    text-align: right;
}

body[data-page="care-team-dashboard"] .care-team-dashboard-detail-dialog .care-team-detail dd {
    text-align: left;
}

.care-team-dashboard-contact-value {
    display: grid;
    justify-items: start;
    gap: 6px;
}

.care-team-dashboard-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.care-team-dashboard-detail-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
}

.care-team-dashboard-detail-actions .primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.care-team-row,
.care-team-empty {
    margin: 0;
    padding: 9px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--rr-background-color);
}

.care-team-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

body[data-page="care-team-members"] .page-content {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    overflow: hidden;
}

body[data-page="care-team-members"] .care-team-app,
body[data-page="care-team-members"] .care-team-section {
    height: 100%;
    min-height: 0;
}

body[data-page="care-team-members"] .care-team-section {
    grid-template-rows: auto minmax(0, 1fr);
}

.care-team-members-table-wrap {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    -webkit-overflow-scrolling: touch;
}

.care-team-members-table {
    width: 100%;
    border-spacing: 0;
    table-layout: fixed;
}

.care-team-members-table th,
.care-team-members-table td {
    padding: 8px 10px;
    border-right: 1px solid var(--color-border);
    text-align: left;
    overflow-wrap: anywhere;
    vertical-align: middle;
}

.care-team-members-table th:last-child,
.care-team-members-table td:last-child {
    border-right: 0;
}

.care-team-members-table th:first-child {
    width: 27%;
}

.care-team-members-table th:nth-child(2) {
    width: 43%;
}

.care-team-members-table th:nth-child(3) {
    width: 30%;
}

.care-team-members-table thead {
    position: sticky;
    top: 0;
    z-index: 3;
}

.care-team-members-table thead th {
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
}

.care-team-member-data-row td {
    background: var(--color-surface);
}

.care-team-member-data-row.is-alternate td {
    background: var(--rr-background-color);
    background: color-mix(in srgb, var(--rr-main-color) 11%, white);
}

.care-team-member-data-row td {
    padding: 0;
    border-top: 1px solid var(--color-border);
}

.care-team-members-table tbody tr:first-child td {
    border-top: 0;
}

.care-team-member-data-row[role="button"] {
    cursor: pointer;
}

.care-team-member-entry {
    position: relative;
    display: grid;
    grid-template-columns: 27fr 43fr 30fr;
    align-items: center;
}

.care-team-member-entry > span {
    min-width: 0;
    padding: 8px 10px 4px;
    overflow-wrap: anywhere;
}

.care-team-member-entry > span + span:not(.care-team-member-groups) {
    border-left: 1px solid var(--color-border);
}

.care-team-member-entry .care-team-member-groups {
    grid-column: 1 / -1;
    padding-top: 2px;
    padding-bottom: 8px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.care-team-member-entry .care-team-member-delete-button {
    position: absolute;
    top: 50%;
    right: 6px;
    margin: 0;
    transform: translateY(-50%);
    background: transparent;
    color: var(--rr-main-color);
}

.care-team-member-entry.has-actions .care-team-member-role {
    padding-right: 48px;
}

.care-team-members-empty {
    padding: 14px !important;
    color: var(--color-text-muted);
    text-align: center !important;
}

.care-team-member-dialog {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
}

.care-team-member-dialog > h2 {
    padding-right: 38px;
}

.care-team-member-editor-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-regular);
}

.care-team-member-editor-delete svg {
    stroke-width: 2;
}

.care-team-member-dialog-form {
    grid-template-columns: 1fr;
    padding: 0;
    border: 0;
    background: transparent;
}

.care-team-toolbar .primary-button {
    width: auto;
}

.request-table-prototype {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    height: 100%;
}

.request-view-controls {
    display: flex;
    grid-row: 1;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.request-view-mode-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.request-view-mode-button {
    min-height: 34px;
    padding: 5px 14px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--rr-main-color);
    font: inherit;
    font-weight: var(--rr-weight-emphasis);
    cursor: pointer;
}

.request-view-mode-button.is-active {
    background: var(--rr-main-color);
    color: #fff;
}

body[data-page="care-team-needs"] .care-team-section {
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body[data-page="care-team-needs"] .page-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body[data-page="care-team-needs"] .care-team-app {
    flex: 1 1 auto;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

body[data-page="care-team-needs"] .page-title-row {
    margin-bottom: 16px;
}

.request-filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 5px 14px;
    border: 1px solid var(--rr-main-color);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--rr-main-color);
    font: inherit;
    font-weight: var(--rr-weight-emphasis);
    cursor: pointer;
}

.request-filters-toggle[aria-expanded="true"] {
    background: var(--rr-main-color);
    color: #fff;
}

.request-filters-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.request-table-filters {
    display: grid;
    grid-row: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.request-table-filters fieldset {
    min-width: 0;
    margin: 0;
    padding: 0 10px 8px;
    border: 1px solid var(--rr-border-color);
    border-top-color: var(--color-surface);
    border-radius: 6px;
    background: var(--color-surface);
    overflow: hidden;
}

.request-table-filters legend {
    float: left;
    width: calc(100% + 20px);
    margin: 0 -10px 8px;
    padding: 5px 10px;
    border-bottom: 1px solid var(--rr-border-color);
    background: var(--color-surface);
    color: var(--rr-main-color);
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.3;
}

.request-filter-legend-icon,
.request-filter-desktop-caption {
    display: none;
}

.is-desktop-device .request-table-filters legend {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--rr-main-color);
    color: #fff;
    font-weight: 700;
}

.is-desktop-device .request-filter-legend-icon {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.is-desktop-device .request-filter-desktop-caption {
    display: inline;
}

.is-desktop-device .request-filter-mobile-caption {
    display: none;
}

.request-table-filters legend + .request-filter-options {
    clear: both;
}

.request-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
}

.request-filter-options label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: var(--rr-weight-label);
}

.request-filter-options input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--rr-main-color);
}

.request-table-wrap {
    grid-row: 3;
    min-height: 0;
    height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-overflow-scrolling: touch;
}

.request-table {
    width: 100%;
    min-width: 760px;
    border-spacing: 0;
    table-layout: fixed;
}

.request-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 4px 10px;
    border-right: 1px solid var(--rr-border-color);
    background: var(--rr-main-color);
    color: var(--color-surface);
    text-align: left;
}

.request-table-urgency-column {
    width: 18%;
}

.request-table-date-column {
    width: 27%;
}

.request-table-status-column {
    width: 20%;
}

.request-table-responsible-column {
    width: 35%;
}

.request-table.is-compact .request-table-urgency-column {
    width: 40%;
}

.request-table.is-compact .request-table-date-column {
    width: 25%;
}

.request-table.is-compact .request-table-status-column {
    width: 15%;
}

.request-table.is-compact .request-table-responsible-column {
    width: 20%;
}

.request-table.is-compact {
    border: 1px solid var(--rr-border-color);
    border-collapse: collapse;
}

.request-table.is-compact th {
    border-right: 0;
    border-bottom: 1px solid var(--rr-border-color);
}

.request-table th:last-child {
    border-right: 0;
}

.request-table-row > td {
    padding: 0;
    border-top: 1px solid var(--rr-border-color);
    border-bottom: 1px solid var(--rr-border-color);
    background: var(--color-surface);
}

.request-table-title-row > td {
    border-right: 1px solid var(--rr-border-color);
    border-left: 1px solid var(--rr-border-color);
}

.request-table-row[role="button"],
.request-table-row[data-request-edit-id] {
    cursor: pointer;
}

.request-table-row[role="button"]:focus-visible {
    outline: 2px solid var(--rr-main-color);
    outline-offset: -2px;
}

.request-table-row > .request-table-title-cell,
.request-table-details-row > td {
    padding: 4px 10px;
    overflow-wrap: anywhere;
}

.request-table-details-row > td {
    border-right: 1px solid var(--rr-border-color);
    vertical-align: middle;
}

.request-table-details-row > td:first-child {
    border-left: 1px solid var(--rr-border-color);
}

.request-table-compact-row > td {
    padding: 4px 10px;
    border: 0;
    border-bottom: 1px solid var(--rr-border-color);
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.request-table.is-compact tbody tr:last-child > td {
    border-bottom: 0;
}

.request-table-compact-action {
    padding: 0 !important;
}

.request-table-action-wrap,
.request-table-title-layout {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

.request-table-title-content {
    flex: 1 1 auto;
    min-width: 0;
}

.request-row-delete-button {
    display: none;
}

.is-mobile-device body[data-page="care-team-needs"] .request-row-delete-button {
    display: inline-grid;
    flex: 0 0 36px;
    place-items: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 5px;
    color: var(--rr-main-color);
    background: transparent;
}

.is-mobile-device body[data-page="care-team-needs"] .request-row-delete-button svg {
    width: 22px;
    height: 22px;
}

.is-mobile-portrait body[data-page="care-team-needs"] .request-table-deletable-row {
    touch-action: pan-y;
}

.is-mobile-portrait body[data-page="care-team-needs"] .request-row-delete-button {
    flex-basis: 0;
    width: 0;
    padding-right: 0;
    padding-left: 0;
    border-width: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(42px);
    transition: width 0.16s ease, flex-basis 0.16s ease, padding 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.is-mobile-portrait body[data-page="care-team-needs"] .request-table-deletable-row.is-delete-revealed .request-row-delete-button {
    flex-basis: 42px;
    width: 42px;
    padding: 5px;
    border-width: 1px;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.request-table-spacer > td {
    height: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

.request-table-title {
    display: block;
    font-size: 1rem;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.35;
}

.request-table-description {
    display: block;
    overflow: hidden;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.request-table-description:empty {
    display: none;
}

.request-table-empty {
    padding: 14px !important;
    color: var(--color-text-muted);
    text-align: center !important;
}

.request-claim-button {
    width: 100%;
    min-height: 34px;
    padding: 4px 6px;
    border: 0;
    border-radius: 5px;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font: inherit;
    font-weight: var(--rr-weight-emphasis);
    line-height: 1.15;
    cursor: pointer;
}

.request-editor-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    height: min(760px, calc(100dvh - 36px));
    max-height: calc(100dvh - 36px);
    overflow: hidden;
}

.is-desktop-device .request-editor-dialog {
    height: auto;
}

.is-desktop-device .request-editor-form,
.is-desktop-device .request-editor-scroll {
    flex: 0 1 auto;
}

.is-desktop-device .request-editor-form textarea[name="description"] {
    height: calc(4.5em + 8px);
    min-height: calc(4.5em + 8px);
}

.request-editor-dialog .request-editor-caption {
    flex: 0 0 auto;
    padding-right: 48px;
    background: var(--color-surface);
    color: var(--rr-main-color);
    font-weight: 700;
    text-align: left;
}

.request-editor-dialog:has(.request-editor-create-event-button:not([hidden])) .request-editor-caption {
    padding-right: 48px;
}

.request-editor-dialog:has(.request-editor-delete-button:not([hidden])):has(.request-editor-create-event-button:not([hidden])) .request-editor-caption {
    padding-right: 108px;
}

.request-editor-delete-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    min-height: 36px;
    color: var(--rr-main-color);
    background: transparent;
}

.request-editor-create-event-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    min-height: 36px;
    background: transparent;
}

.request-editor-dialog:has(.request-editor-delete-button:not([hidden])) .request-editor-create-event-button {
    right: 64px;
}

.request-editor-create-event-button img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.request-editor-create-event-button:hover,
.request-editor-create-event-button:focus-visible {
    background: var(--color-primary-soft);
}

.request-editor-delete-button:hover,
.request-editor-delete-button:focus-visible {
    background: var(--color-primary-soft);
}

.request-editor-form {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
}

.request-editor-scroll {
    display: grid;
    flex: 1 1 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    width: 100%;
    gap: 8px;
    min-height: 0;
    padding-right: 2px;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.request-editor-title-field {
    display: grid;
    grid-column: 1 / -1;
    width: 100%;
}

.request-editor-link-field {
    grid-column: 1 / -1;
}

.request-editor-link-control {
    display: flex;
    width: 100%;
}

.request-editor-link-control input {
    min-width: 0;
    border-radius: 4px 0 0 4px !important;
}

.request-editor-link-test {
    display: grid;
    flex: 0 0 38px;
    place-items: center;
    min-height: 28px;
    padding: 4px;
    border: 1px solid var(--rr-main-color);
    border-left: 0;
    border-radius: 0 4px 4px 0;
    background: var(--rr-main-color);
    color: #fff;
    cursor: pointer;
}

.request-editor-link-test svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.request-editor-link-test:disabled {
    opacity: 0.45;
    cursor: default;
}

.request-editor-when-row {
    display: flex;
    grid-column: 1 / -1;
    align-items: flex-end;
    align-self: start;
    gap: 8px;
    width: max-content;
    min-width: 100%;
    overflow: visible;
}

.request-editor-when-row > label {
    flex: 0 0 auto;
}

.request-editor-when-field,
.request-editor-when-field select {
    width: max-content;
    max-width: none;
}

.request-editor-date-field .rr-i18n-date-control {
    width: auto;
}

.request-editor-date-field .rr-i18n-date-display {
    flex: 0 0 19ch;
    width: 19ch;
}

.request-editor-time-field,
.request-editor-time-field input[type="time"] {
    width: 9ch;
}

.is-mobile-device .request-editor-when-row {
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
}

.is-mobile-device .request-editor-when-field {
    flex: 0 0 100%;
}

.request-editor-form input[type="checkbox"] {
    width: 1.5em;
    height: 1.5em;
}

.request-editor-expiration-field {
    width: max-content;
    max-width: 100%;
}

.request-editor-status-row {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}

.request-editor-status-row > label {
    flex: 0 0 auto;
}

.request-editor-status-field,
.request-editor-status-field select {
    width: max-content;
    max-width: 100%;
}

.request-editor-status-field {
    justify-self: start;
}

.request-editor-assignee-field,
.request-editor-assignee-field select {
    width: max-content;
    max-width: 100%;
}

.is-desktop-device .request-editor-status-row {
    flex-wrap: nowrap;
}

.request-editor-expiration-field .rr-i18n-date-control {
    width: auto;
    max-width: 100%;
}

.request-editor-expiration-field .rr-i18n-date-display {
    flex: 0 0 calc(18ch + 6px);
    width: calc(18ch + 6px);
}

.request-editor-scroll .care-team-wide-field,
.request-editor-actions {
    grid-column: 1 / -1;
}

.request-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 10px;
    background: var(--color-surface);
}

.request-delete-confirm-button {
    background: var(--rr-main-color);
    color: #fff;
    font-weight: 700;
}

@media (max-width: 700px) {
    .request-table-filters,
    .request-editor-scroll {
        grid-template-columns: 1fr;
    }

    .request-editor-form .care-team-wide-field,
    .request-editor-actions {
        grid-column: 1;
    }
}

.is-mobile-device .request-filters-toggle {
    min-height: 42px;
    padding: 8px 14px;
}

.request-filter-count {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-size: 0.8rem;
    line-height: 1;
}

.request-filters-toggle[aria-expanded="true"] .request-filter-count {
    background: var(--color-surface);
    color: var(--rr-main-color);
}

.request-table-filters:not(.is-open) {
    display: none;
}

.is-mobile-device .request-table-filters {
    grid-template-columns: minmax(0, 1fr);
}

.is-mobile-device .request-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.is-mobile-device .request-table {
    min-width: 0;
    font-size: clamp(0.65rem, 2.8vw, 0.84rem);
}

.is-mobile-device .request-table th,
.is-mobile-device .request-table-details-row > td,
.is-mobile-device .request-table-title-cell {
    padding: 4px 3px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.is-mobile-device .request-table-title {
    font-size: 1rem;
    line-height: 1.35;
}

.is-mobile-device .request-table-description {
    display: none;
}

.care-team-group-row,
.care-team-clickable-row {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.care-team-clickable-row:hover,
.care-team-clickable-row:focus-visible {
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.care-team-clickable-row:hover strong,
.care-team-clickable-row:hover em,
.care-team-clickable-row:focus-visible strong,
.care-team-clickable-row:focus-visible em {
    color: inherit;
}

.care-team-clickable-row:hover .primary-button,
.care-team-clickable-row:focus-visible .primary-button {
    border-color: var(--color-surface);
    background: var(--color-surface);
    color: var(--rr-main-color);
}

.care-team-quick-accept-button,
.care-team-clickable-row:hover .care-team-quick-accept-button,
.care-team-clickable-row:focus-visible .care-team-quick-accept-button {
    border-color: var(--rr-main-color);
    background: var(--rr-main-color);
    color: #fff;
    font-weight: 700;
}

.care-team-clickable-row:focus {
    outline: 2px solid var(--rr-main-color);
    outline-offset: 2px;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-clickable-row {
    -webkit-tap-highlight-color: transparent;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-clickable-row:hover {
    background: var(--rr-background-color);
    color: inherit;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-clickable-row:hover strong {
    color: inherit;
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-clickable-row:hover em {
    color: var(--color-muted);
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-clickable-row:hover .primary-button {
    border-color: var(--rr-main-color);
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.is-mobile-device body[data-page="care-team-dashboard"] .care-team-clickable-row:focus:not(:focus-visible) {
    outline: none;
}

.care-team-member-delete-button {
    align-self: stretch;
    background: inherit;
    color: var(--rr-main-color);
}

.care-team-groups-table-wrap {
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--rr-border-color);
    border-radius: 6px;
}

.care-team-groups-table {
    width: 100%;
    border-spacing: 0;
    table-layout: fixed;
}

.care-team-groups-table th,
.care-team-groups-table td {
    height: 48px;
    padding: 4px 8px;
    border-right: 1px solid var(--rr-border-color);
    border-bottom: 1px solid var(--rr-border-color);
    text-align: left;
    vertical-align: middle;
}

.care-team-groups-table th:last-child,
.care-team-groups-table td:last-child {
    border-right: 0;
}

.care-team-groups-table tbody tr:last-child td {
    border-bottom: 0;
}

.care-team-groups-table th:first-child {
    width: 42%;
}

.care-team-groups-table thead th {
    background: var(--rr-main-color);
    color: var(--color-surface);
    font-weight: var(--rr-weight-emphasis);
}

.care-team-group-row {
    position: relative;
    background: var(--color-surface);
    cursor: pointer;
}

.care-team-group-row:nth-child(even) {
    background: color-mix(in srgb, var(--rr-main-color) 11%, white);
}

.care-team-group-row:hover,
.care-team-group-row:focus-visible {
    background: color-mix(in srgb, var(--rr-main-color) 18%, white);
    outline: 2px solid var(--rr-main-color);
    outline-offset: -2px;
}

.care-team-group-row td {
    background: inherit;
}

.care-team-group-name-content,
.care-team-group-members-content {
    display: flex;
    align-items: center;
    min-width: 0;
}

.care-team-group-name-content {
    gap: 6px;
}

.care-team-group-name-content strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.care-team-group-member-count {
    flex: 0 0 auto;
    color: var(--color-text-muted);
    font-size: 0.86rem;
    white-space: nowrap;
}

.care-team-group-members-content {
    gap: 8px;
}

.care-team-group-members-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.care-team-groups-empty {
    color: var(--color-text-muted);
    text-align: center !important;
}

.care-team-group-drag-handle {
    flex: 0 0 30px;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rr-main-color);
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.care-team-group-drag-handle:active {
    cursor: grabbing;
}

.care-team-group-drag-handle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.care-team-group-delete-button {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    color: var(--rr-main-color);
}

.care-team-group-row.is-group-dragging {
    opacity: 0.82;
    box-shadow: var(--shadow-md);
}

.is-mobile-portrait body[data-page="care-team-members"] .care-team-member-entry {
    overflow: hidden;
}

.is-mobile-portrait body[data-page="care-team-members"] .care-team-member-delete-button {
    position: absolute;
    top: 50%;
    right: -42px;
    z-index: 2;
    display: inline-grid;
    place-content: center;
    width: 42px;
    min-height: 42px;
    opacity: 0;
    visibility: hidden;
    transition: right 0.16s ease, opacity 0.16s ease;
}

.is-mobile-portrait body[data-page="care-team-members"] .care-team-member-entry.has-actions .care-team-member-role {
    padding-right: 10px;
}

.is-mobile-portrait body[data-page="care-team-members"] .care-team-member-row.is-delete-revealed .care-team-member-delete-button {
    right: 0;
    opacity: 1;
    visibility: visible;
}

.is-mobile-device body[data-page="care-groups"] .care-team-group-row {
    overflow: visible;
    touch-action: pan-y;
}

.is-mobile-device body[data-page="care-groups"] .care-team-group-drag-handle {
    display: none;
}

.is-mobile-device body[data-page="care-groups"] .care-team-group-members-cell {
    position: relative;
    overflow: hidden;
}

.is-mobile-device body[data-page="care-groups"] .care-team-group-members-text {
    transition: transform 0.16s ease;
}

.is-mobile-device body[data-page="care-groups"] .care-team-group-row.is-delete-revealed .care-team-group-members-text {
    transform: translateX(-42px);
}

.is-mobile-device body[data-page="care-groups"] .care-team-group-delete-button {
    position: absolute;
    top: 50%;
    right: -42px;
    z-index: 2;
    display: inline-grid;
    place-content: center;
    width: 42px;
    height: 42px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%);
    transition: right 0.16s ease, opacity 0.16s ease;
}

.is-mobile-device body[data-page="care-groups"] .care-team-group-row.is-delete-revealed .care-team-group-delete-button {
    right: 0;
    opacity: 1;
    visibility: visible;
}

.is-mobile-device body[data-page="care-need-types"] .care-team-need-type-row {
    grid-template-columns: minmax(0, 1fr) 42px;
    position: relative;
    overflow: hidden;
}

.is-mobile-device body[data-page="care-need-types"] .care-team-need-type-summary {
    transition: transform 0.16s ease;
}

.care-team-need-type-delete-button {
    background: var(--rr-background-color);
    color: var(--rr-main-color);
}

.care-team-need-type-row {
    cursor: pointer;
}

.care-team-need-type-caption {
    margin: 4px 0 0;
    color: var(--rr-main-color);
    font-size: 1.05rem;
}

.care-team-need-type-row:hover,
.care-team-need-type-row:focus-within {
    background: var(--rr-main-color);
    color: var(--color-surface);
}

.care-team-need-type-row:hover .care-team-need-type-delete-button,
.care-team-need-type-row:focus-within .care-team-need-type-delete-button {
    background: inherit;
    color: inherit;
}

.is-mobile-device body[data-page="care-need-types"] .care-team-need-type-row.is-delete-revealed .care-team-need-type-summary {
    transform: translateX(-42px);
}

.is-mobile-device body[data-page="care-need-types"] .care-team-need-type-delete-button {
    position: absolute;
    top: 0;
    right: -42px;
    bottom: 0;
    z-index: 2;
    display: inline-grid;
    place-content: center;
    width: 42px;
    min-height: 100%;
    opacity: 0;
    transition: right 0.16s ease, opacity 0.16s ease;
}

.is-mobile-device body[data-page="care-need-types"] .care-team-need-type-row.is-delete-revealed .care-team-need-type-delete-button {
    right: 0;
    opacity: 1;
}

.care-team-row strong,
.care-team-row span {
    min-width: 0;
}

.care-team-row span {
    color: var(--color-muted);
    font-size: 0.92rem;
}

.care-team-manage-row > span {
    display: grid;
    gap: 3px;
}

.care-team-manage-row em {
    color: var(--color-muted);
    font-size: 0.92rem;
    font-style: normal;
}

.care-team-row .request-card-urgency-value,
.care-team-row .request-card-completer-value {
    color: inherit;
    font-size: inherit;
    font-weight: 700;
}

.care-team-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: end;
}

.care-team-row-actions button {
    min-height: 32px;
    padding: 5px 8px;
}

.care-team-accept-dialog form {
    display: grid;
    gap: 10px;
}

.care-team-reminder-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
}

@media (max-width: 560px) {
    .care-team-overview {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .care-team-inline-form,
    .care-team-filters {
        grid-template-columns: 1fr;
    }

    .care-team-row {
        grid-template-columns: 1fr;
    }

    .care-team-row-actions {
        justify-content: start;
    }

    .care-team-detail dl,
    .care-team-reminder-row {
        grid-template-columns: 1fr;
    }
}
