:root {
    color-scheme: light dark;
    --bg: #f5f7f8;
    --panel: #ffffff;
    --panel-soft: #fbfcfc;
    --surface: #f0f4f5;
    --surface-hover: #eef3f2;
    --text: #172026;
    --muted: #65737e;
    --line: #d9e0e5;
    --accent: #1b6f64;
    --accent-text: #ffffff;
    --danger: #a13636;
    --notice-bg: #fff4d8;
    --notice-border: #ead18b;
    --notice-text: #6f5312;
    --success-bg: #e8f4f1;
    --success-border: #bddbd4;
    --shadow: rgba(23, 32, 38, .14);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #101417;
    --panel: #171d21;
    --panel-soft: #1d2429;
    --surface: #20282d;
    --surface-hover: #263036;
    --text: #edf3f4;
    --muted: #9ba9b2;
    --line: #334047;
    --accent: #38b7a6;
    --accent-text: #071210;
    --danger: #ff8f8f;
    --notice-bg: #2c2414;
    --notice-border: #705b20;
    --notice-text: #f1d28b;
    --success-bg: #15302c;
    --success-border: #2a6b61;
    --shadow: rgba(0, 0, 0, .45);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        color-scheme: dark;
        --bg: #101417;
        --panel: #171d21;
        --panel-soft: #1d2429;
        --surface: #20282d;
        --surface-hover: #263036;
        --text: #edf3f4;
        --muted: #9ba9b2;
        --line: #334047;
        --accent: #38b7a6;
        --accent-text: #071210;
        --danger: #ff8f8f;
        --notice-bg: #2c2414;
        --notice-border: #705b20;
        --notice-text: #f1d28b;
        --success-bg: #15302c;
        --success-border: #2a6b61;
        --shadow: rgba(0, 0, 0, .45);
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    scrollbar-color: rgba(137, 155, 166, .46) transparent;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    height: 11px;
    width: 11px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: rgba(137, 155, 166, .34);
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: rgba(56, 189, 171, .72);
}

.grid-stack-item-content,
.widget-body,
.mail-message-frame,
.inbox-list,
.full-page-tool,
textarea {
    scrollbar-color: rgba(137, 155, 166, .46) transparent;
    scrollbar-width: thin;
}

.grid-stack-item-content::-webkit-scrollbar,
.widget-body::-webkit-scrollbar,
.mail-message-frame::-webkit-scrollbar,
.inbox-list::-webkit-scrollbar,
.full-page-tool::-webkit-scrollbar,
textarea::-webkit-scrollbar {
    height: 11px;
    width: 11px;
}

.grid-stack-item-content::-webkit-scrollbar-thumb,
.widget-body::-webkit-scrollbar-thumb,
.mail-message-frame::-webkit-scrollbar-thumb,
.inbox-list::-webkit-scrollbar-thumb,
.full-page-tool::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
    background-color: rgba(137, 155, 166, .38);
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

.grid-stack-item-content::-webkit-scrollbar-thumb:hover,
.widget-body::-webkit-scrollbar-thumb:hover,
.mail-message-frame::-webkit-scrollbar-thumb:hover,
.inbox-list::-webkit-scrollbar-thumb:hover,
.full-page-tool::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
    background-color: rgba(56, 189, 171, .76);
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 0 calc(24px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 761px) {
    .page:has(.dashboard-layout-desktop_grid.grid-stack) {
        width: calc(100% - 32px);
    }
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.appbar {
    align-items: flex-start;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
}

.appbar-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 42px;
}

.appbar-title {
    min-width: 0;
}

.appbar-title h1 {
    line-height: 40px;
    margin-bottom: 4px;
}

.appbar-title p {
    margin: 0;
}

.appbar-title-row {
    align-items: flex-start;
    display: flex;
    gap: 4px;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    min-width: 0;
    width: 100%;
}

.appbar-title-row .back-button {
    flex: 0 0 auto;
    margin-top: 0;
}

.back-button {
    border-radius: 999px;
    position: relative;
}

.back-button span {
    border-bottom: 3px solid currentColor;
    border-left: 3px solid currentColor;
    display: block;
    height: 14px;
    transform: translateX(2px) rotate(45deg);
    width: 14px;
}

.appbar-title h1,
.appbar-title p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topnav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.topnav .button,
.topnav form {
    width: auto;
}

.topnav button,
.topnav .button {
    min-width: 96px;
    width: auto;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin: -8px 0 16px;
}

.page-actions .button {
    width: auto;
}

.top-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    position: relative;
}

.appbar-compact .top-actions {
    grid-column: 2;
    justify-self: end;
}

.appbar:not(.appbar-compact) .top-actions {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
    width: 100%;
}

.appbar:not(.appbar-compact) .home-button {
    font-size: 24px;
    margin-right: auto;
}

.icon-button {
    align-items: center;
    background: transparent;
    border-color: transparent;
    color: var(--text);
    display: inline-flex;
    height: 40px;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    width: 40px;
}

.top-actions > .icon-button,
.top-actions > .top-icon-form > .icon-button,
.tools-menu summary {
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.top-actions > .icon-button:hover,
.top-actions > .top-icon-form > .icon-button:hover,
.tools-menu summary:hover {
    background: var(--surface-hover);
}

.top-action-sync .icon-button {
    background: linear-gradient(135deg, rgba(0, 196, 167, 0.24), rgba(0, 128, 255, 0.12));
    color: #00c4a7;
}

.top-action-calendar {
    background: linear-gradient(135deg, rgba(48, 123, 255, 0.24), rgba(93, 76, 255, 0.14));
    color: #6ea2ff;
}

.top-action-distraction {
    background: linear-gradient(135deg, rgba(255, 190, 86, 0.2), rgba(56, 183, 166, 0.12));
    color: #ffc45e;
}

.top-action-distraction.is-active {
    box-shadow: 0 0 0 2px rgba(255, 196, 94, .24);
}

.tools-menu summary {
    background: linear-gradient(135deg, rgba(132, 145, 255, 0.2), rgba(42, 193, 255, 0.1));
    color: #9aa7ff;
}

.ui-icon {
    fill: none;
    height: 24px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 24px;
}

.top-icon-form {
    margin: 0;
}

.top-search {
    display: none;
    gap: 6px;
    grid-column: 1 / -1;
    margin-top: 8px;
    width: 100%;
}

body.is-distraction-free {
    background: var(--bg);
}

body.is-distraction-free .appbar {
    display: none;
}

body.is-distraction-free .page {
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    width: calc(100% - 16px);
}

.distraction-exit {
    align-items: center;
    background: color-mix(in srgb, var(--panel) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
    border-radius: 999px;
    box-shadow: 0 12px 28px var(--shadow);
    color: var(--text);
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    min-height: 36px;
    padding: 0 14px;
    position: fixed;
    right: max(12px, env(safe-area-inset-right, 0px));
    top: max(12px, env(safe-area-inset-top, 0px));
    z-index: 5000;
}

.distraction-exit[hidden] {
    display: none;
}

.distraction-exit:hover,
.distraction-exit:focus-visible {
    background: var(--panel);
}

.top-search.is-open,
.top-search:focus-within {
    display: flex;
}

.top-search input {
    flex: 1 1 auto;
    min-width: 0;
}

.top-search .search-submit {
    display: none;
}

.top-search.is-open .search-submit,
.top-search:focus-within .search-submit {
    display: inline-flex;
}

.avatar-menu,
.tools-menu {
    position: relative;
}

.avatar-menu summary,
.tools-menu summary {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    list-style: none;
    width: 42px;
}

.avatar-menu summary::-webkit-details-marker,
.tools-menu summary::-webkit-details-marker {
    display: none;
}

.avatar-menu img {
    border: 1px solid var(--line);
    border-radius: 50%;
    display: block;
    height: 34px;
    width: 34px;
}

.avatar-preview {
    border: 1px solid var(--line);
    border-radius: 50%;
    height: 72px;
    object-fit: cover;
    width: 72px;
}

.avatar-cropper {
    display: grid;
    gap: 10px;
}

.avatar-cropper canvas {
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: move;
    max-width: 240px;
    touch-action: none;
    width: 100%;
}

.avatar-menu-panel,
.tools-menu-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px var(--shadow);
    display: grid;
    gap: 2px;
    max-width: min(320px, calc(100vw - 32px));
    min-width: 260px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
}

.avatar-menu-panel > a,
.avatar-menu-panel > form > button,
.avatar-menu-panel > span:not(.menu-kicker) {
    align-items: center;
    background: transparent;
    border-color: transparent;
    color: var(--text);
    display: grid;
    gap: 10px;
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 8px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.tools-menu-panel > a,
.tools-menu-panel > button,
.tools-menu-panel > form > button,
.tools-menu-panel > span {
    align-items: center;
    background: transparent;
    border-color: transparent;
    color: var(--text);
    display: flex;
    min-height: 40px;
    padding: 8px 12px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
}

.tools-menu-panel > .has-menu-icon,
.tools-menu-panel > form > .has-menu-icon {
    display: grid;
    gap: 10px;
    grid-template-columns: 24px minmax(0, 1fr);
    white-space: normal;
}

.avatar-menu-panel .menu-icon,
.tools-menu-panel .menu-icon {
    display: inline-flex;
    grid-column: 1;
    justify-content: center;
    padding: 0;
    width: 24px;
}

.avatar-menu-panel > a > span:last-child,
.avatar-menu-panel > form > button > span:last-child,
.avatar-menu-panel > span:not(.menu-kicker) > span:last-child {
    grid-column: 2;
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.tools-menu-panel > .has-menu-icon > span:last-child,
.tools-menu-panel > form > .has-menu-icon > span:last-child {
    grid-column: 2;
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.avatar-menu-panel > strong,
.avatar-menu-panel > small,
.avatar-menu-panel .menu-kicker {
    padding-left: 8px;
    padding-right: 8px;
}

.avatar-menu-panel .menu-kicker {
    display: block;
    color: var(--text);
    font-weight: 600;
    padding-bottom: 2px;
}

.avatar-menu-panel > strong {
    padding-top: 4px;
}

.avatar-menu-panel > a:hover,
.avatar-menu-panel > form > button:hover,
.tools-menu-panel > a:hover,
.tools-menu-panel > button:hover,
.tools-menu-panel > form > button:hover {
    background: var(--surface-hover);
}

.tools-menu-panel > form {
    margin: 0;
}

.avatar-menu-panel small {
    color: var(--muted);
    overflow-wrap: anywhere;
    padding-bottom: 8px;
}

h1, h2 {
    margin: 0 0 12px;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 18px;
}

p {
    margin: 0 0 10px;
}

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

.dashboard-grid {
    align-items: start;
}

@media (min-width: 761px) {
    .dashboard-grid.dashboard-layout-classic.dashboard-columns-auto {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    @media (min-width: 1100px) {
        .dashboard-grid.dashboard-layout-classic.dashboard-columns-auto {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }

    .dashboard-grid.dashboard-layout-classic.dashboard-columns-1 {
        grid-template-columns: 1fr;
    }

    .dashboard-grid.dashboard-layout-classic.dashboard-columns-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid.dashboard-layout-classic.dashboard-columns-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-grid.dashboard-layout-desktop_grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .dashboard-grid.dashboard-layout-desktop_grid > .widget {
        grid-column: span 6;
    }

    .dashboard-grid.dashboard-layout-desktop_grid.dashboard-columns-1 > .widget {
        grid-column: span 12;
    }

    .dashboard-grid.dashboard-layout-desktop_grid.dashboard-columns-3 > .widget,
    .dashboard-grid.dashboard-layout-desktop_grid.dashboard-columns-auto > .widget {
        grid-column: span 4;
    }

    .dashboard-grid.dashboard-layout-desktop_grid.dashboard-columns-2 > .widget {
        grid-column: span 6;
    }

    .dashboard-grid.dashboard-layout-desktop_grid > .widget-datetime,
    .dashboard-grid.dashboard-layout-desktop_grid > .widget-spaceweather {
        grid-column: span 6;
    }

    .dashboard-grid.dashboard-layout-desktop_grid > .widget-today,
    .dashboard-grid.dashboard-layout-desktop_grid > .widget-tomorrow {
        grid-column: span 6;
    }

    .dashboard-grid.dashboard-layout-desktop_grid.grid-stack {
        background-image: none;
        display: block;
        min-height: 70vh;
    }

    .dashboard-grid.dashboard-layout-desktop_grid.grid-stack.is-editing-layout {
        background-image: radial-gradient(circle, color-mix(in srgb, var(--accent) 46%, transparent) 1px, transparent 1px);
        background-position: 8px 8px;
        background-size: calc((100% - 16px) / 12) 72px;
        border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
        border-radius: 10px;
        padding: 8px;
    }

    .dashboard-grid.dashboard-layout-desktop_grid.grid-stack > .grid-stack-item {
        grid-column: auto;
    }

    .dashboard-grid.dashboard-layout-masonry:not(.is-editing-layout) {
        column-gap: 16px;
        display: block;
    }

    .dashboard-grid.dashboard-layout-masonry:not(.is-editing-layout).dashboard-columns-auto {
        column-count: 2;
    }

    @media (min-width: 1100px) {
        .dashboard-grid.dashboard-layout-masonry:not(.is-editing-layout).dashboard-columns-auto {
            column-count: 3;
        }
    }

    .dashboard-grid.dashboard-layout-masonry:not(.is-editing-layout).dashboard-columns-1 {
        column-count: 1;
    }

    .dashboard-grid.dashboard-layout-masonry:not(.is-editing-layout).dashboard-columns-2 {
        column-count: 2;
    }

    .dashboard-grid.dashboard-layout-masonry:not(.is-editing-layout).dashboard-columns-3 {
        column-count: 3;
    }

    .dashboard-grid.dashboard-layout-masonry:not(.is-editing-layout) .widget {
        break-inside: avoid;
        display: inline-block;
        margin: 0 0 16px;
        width: 100%;
    }
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.widget {
    transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.widget-header {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    position: relative;
}

.widget-header h2 {
    margin: 0;
    min-width: 0;
}

.widget-actions {
    align-items: center;
    display: inline-flex;
    gap: 4px;
    justify-self: end;
}

.unseen-badge {
    align-items: center;
    background: #f4b740;
    border-radius: 999px;
    color: #172026;
    display: none;
    font-size: 13px;
    font-weight: 800;
    height: 18px;
    justify-content: center;
    line-height: 1;
    width: 18px;
}

.widget.is-collapsed.has-unseen .unseen-badge {
    display: inline-flex;
}

.collapse-toggle,
.drag-handle,
.widget-remove-toggle,
.widget-fit-toggle,
.widget-config-toggle {
    align-items: center;
    background: transparent;
    border-color: transparent;
    color: var(--text);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.collapse-toggle {
    font-size: 16px;
}

.collapse-toggle span {
    display: inline-block;
    transition: transform .16s ease;
}

.collapse-toggle[aria-expanded="true"] span {
    transform: rotate(90deg);
}

.collapse-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.drag-handle {
    background: var(--surface-hover);
    border-color: var(--line);
    cursor: grab;
    display: none;
}

.widget-config-toggle {
    background: var(--surface-hover);
    border-color: var(--line);
    display: none;
    font-size: 15px;
}

.widget-fit-toggle {
    background: var(--surface-hover);
    border-color: var(--line);
    display: none;
    font-size: 17px;
}

.widget-remove-toggle {
    background: color-mix(in srgb, #ff5a7a 15%, var(--surface-hover));
    border-color: color-mix(in srgb, #ff5a7a 34%, var(--line));
    color: #ffb2c0;
    display: none;
    font-size: 22px;
    line-height: 1;
}

.widget-remove-toggle:focus-visible {
    outline: 2px solid #ff7f98;
    outline-offset: 2px;
}

.widget-body {
    margin-top: 12px;
}

.widget-config {
    background: color-mix(in srgb, var(--surface-hover) 72%, transparent);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: none;
    gap: 9px;
    margin-top: 12px;
    max-height: min(420px, 54vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
}

.grid.is-editing-layout .widget.is-config-open .widget-config {
    display: grid;
}

.widget.is-collapsed .widget-config {
    display: none;
}

.widget-config-options {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.widget-config-section {
    border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
    display: grid;
    gap: 8px;
    padding-top: 10px;
}

.widget-config-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.widget-scope-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.widget-scope-badges span {
    background: color-mix(in srgb, var(--accent) 14%, var(--panel-strong));
    border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
    border-radius: 999px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    padding: 4px 8px;
}

.widget-config label {
    align-items: center;
    display: inline-flex;
    gap: 7px;
    margin: 0;
}

.widget-config input {
    min-height: auto;
}

.widget-config .widget-config-field {
    align-items: stretch;
    display: grid;
    gap: 5px;
}

.widget-config textarea {
    min-height: 92px;
}

.mini-editor {
    display: grid;
    gap: 7px;
}

.mini-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.widget-custom-text {
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
    border-radius: 7px;
    color: var(--text);
    margin-bottom: 12px;
    padding: 10px;
}

.widget-custom-text :first-child {
    margin-top: 0;
}

.widget-custom-text :last-child {
    margin-bottom: 0;
}

.widget.is-collapsed {
    padding-block: 12px;
}

.widget.is-collapsed .widget-header h2 {
    margin: 0;
}

.widget.is-refreshing .widget-body {
    opacity: .82;
    transition: opacity .2s ease;
}

.widget-dashboard-item.has-custom-item-style {
    background: var(--item-background, var(--panel));
    border-color: var(--item-border, var(--line));
    color: var(--item-text, var(--text));
}

.board-switcher {
    align-items: center;
    display: flex;
    gap: 10px;
    margin: 0 auto 14px;
    max-width: 1280px;
    padding: 0 8px;
}

.board-switcher > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.board-switcher > div {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 8px;
}

.board-switcher a {
    background: color-mix(in srgb, var(--surface-hover) 78%, transparent);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    padding: 8px 12px;
    text-decoration: none;
}

.board-switcher a.is-active {
    background: color-mix(in srgb, var(--accent) 26%, var(--surface-hover));
    border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
    color: var(--text);
}

.dashboard-layout-desktop_grid.grid-stack .widget-dashboard-item.has-custom-item-style > .grid-stack-item-content {
    background: var(--item-background, var(--panel));
    border-color: var(--item-border, var(--line));
    color: var(--item-text, var(--text));
}

.widget-dashboard-group .dashboard-group-body {
    display: grid;
    gap: 10px;
}

.dashboard-group-description {
    margin-bottom: 0;
}

.dashboard-group-empty {
    align-items: center;
    background: color-mix(in srgb, var(--surface-hover) 78%, transparent);
    border: 1px dashed color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 8px;
    color: var(--muted);
    display: flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 92px;
    padding: 14px;
    text-align: center;
}

.dashboard-group-features {
    display: grid;
    gap: 10px;
}

.dashboard-group-layout-compact .dashboard-group-features {
    gap: 6px;
}

.dashboard-group-feature {
    background: color-mix(in srgb, var(--surface-hover) 56%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 10px;
}

.dashboard-group-layout-compact .dashboard-group-feature {
    padding: 8px;
}

.dashboard-group-layout-compact .dashboard-group-feature > :not(.dashboard-group-feature-head) {
    font-size: 13px;
}

.dashboard-group-feature-head {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto 1fr auto;
}

.dashboard-group-feature-drag,
.dashboard-group-feature-remove {
    align-items: center;
    background: var(--surface-hover);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    display: none;
    font-size: 13px;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 28px;
}

.dashboard-group-feature-drag {
    cursor: grab;
    touch-action: none;
}

.dashboard-group-feature-remove {
    background: color-mix(in srgb, #ff5a7a 14%, var(--surface-hover));
    border-color: color-mix(in srgb, #ff5a7a 34%, var(--line));
    color: #ffb2c0;
}

.grid.is-editing-layout .dashboard-group-feature-drag,
.grid.is-editing-layout .dashboard-group-feature-remove {
    display: inline-flex;
}

.dashboard-group-feature.is-group-feature-dragging {
    opacity: .72;
    outline: 2px solid color-mix(in srgb, var(--accent) 66%, transparent);
}

.widget-dashboard-group.is-group-drop-target > .grid-stack-item-content,
.widget-dashboard-group.is-group-drop-target.panel {
    border-color: #f6c453;
    box-shadow: 0 0 0 2px color-mix(in srgb, #f6c453 46%, transparent), 0 10px 28px var(--shadow);
}

.widget-dashboard-group.is-group-drop-target .dashboard-group-body {
    background: color-mix(in srgb, #f6c453 9%, transparent);
    border-radius: 8px;
    outline: 1px dashed color-mix(in srgb, #f6c453 60%, transparent);
    outline-offset: 4px;
}

.dashboard-group-feature.is-layout-just-added,
.widget.is-layout-just-added > .grid-stack-item-content,
.widget.is-layout-just-added.panel {
    animation: layout-added-pulse 1300ms ease;
}

.dashboard-group-feature h3 {
    font-size: 14px;
    margin: 0;
    min-width: 0;
}

@keyframes layout-added-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 72%, transparent);
    }
    45% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 38%, transparent);
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

.widget.is-collapsed .widget-body {
    display: none;
}

@media (min-width: 761px) {
    .dashboard-layout-desktop_grid.grid-stack .collapse-toggle {
        display: none;
    }

    .dashboard-layout-desktop_grid.grid-stack .widget.is-collapsed .widget-body {
        display: block;
    }

    .dashboard-layout-desktop_grid.grid-stack > .grid-stack-item > .grid-stack-item-content {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .dashboard-layout-desktop_grid.grid-stack .widget-header,
    .dashboard-layout-desktop_grid.grid-stack .widget-config {
        flex: 0 0 auto;
    }

    .dashboard-layout-desktop_grid.grid-stack .widget-header {
        background: var(--panel);
        border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
        box-shadow: 0 1px 0 color-mix(in srgb, var(--text) 5%, transparent);
        margin: -16px -16px 0;
        padding: 12px 16px 11px;
    }

    .dashboard-layout-desktop_grid.grid-stack .widget-header::after {
        background: linear-gradient(180deg, color-mix(in srgb, var(--shadow) 18%, transparent), transparent);
        bottom: -3px;
        content: "";
        height: 3px;
        left: 0;
        opacity: .7;
        pointer-events: none;
        position: absolute;
        right: 0;
    }

    .dashboard-layout-desktop_grid.grid-stack .widget-body {
        flex: 1 1 auto;
        margin-top: 12px;
        min-height: 0;
        overflow: auto;
        padding-right: 4px;
    }

    .dashboard-layout-desktop_grid.grid-stack.is-editing-layout .widget.is-collapsed.is-config-open .widget-config {
        display: grid;
    }
}

.grid.is-editing-layout .widget {
    border-color: var(--accent);
    box-shadow: 0 2px 10px var(--shadow);
}

.dashboard-layout-desktop_grid.grid-stack.is-editing-layout .grid-stack-item-content {
    border-color: var(--accent);
    box-shadow: 0 2px 10px var(--shadow);
}

.dashboard-layout-desktop_grid.grid-stack .layout-drop-preview {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 2px dashed color-mix(in srgb, var(--accent) 78%, transparent);
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent);
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.grid.is-editing-layout .drag-handle {
    display: inline-flex;
}

.grid.is-editing-layout .widget-config-toggle {
    display: inline-flex;
}

.grid.is-editing-layout .widget-fit-toggle {
    display: inline-flex;
}

.grid.is-editing-layout .widget-remove-toggle {
    display: inline-flex;
}

.widget.is-layout-removed {
    display: none !important;
}

.widget.is-dragging {
    opacity: .65;
}

.grid-stack-item.ui-draggable-dragging > .grid-stack-item-content,
.grid-stack-item.ui-resizable-resizing > .grid-stack-item-content {
    border-color: var(--accent);
    box-shadow: 0 10px 28px var(--shadow);
    opacity: .92;
}

.dashboard-layout-desktop_grid.grid-stack.is-editing-layout .drag-handle {
    cursor: move;
}

.grid-stack-placeholder > .placeholder-content {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    border: 1px dashed var(--accent);
    border-radius: 8px;
}

.grid.is-editing-layout .drag-handle {
    touch-action: none;
}

.layout-edit-bar {
    align-items: center;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    bottom: 0;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
    display: flex;
    gap: 10px;
    justify-content: center;
    left: 0;
    min-height: 62px;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    transform: translateY(100%);
    transition: transform .18s ease, opacity .18s ease;
    z-index: 120;
}

.layout-edit-status {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    min-width: 0;
}

.layout-edit-status-short {
    display: none;
}

.layout-edit-icon-button {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    min-height: 42px;
}

.layout-edit-icon-button > span:first-child {
    display: inline-grid;
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
    place-items: center;
}

.layout-widget-library {
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    border: 1px solid var(--line);
    border-radius: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
    display: grid;
    gap: 12px;
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
    left: 50%;
    max-height: min(620px, calc(100vh - 128px));
    max-width: min(560px, calc(100vw - 32px));
    overflow: hidden;
    padding: 14px;
    position: fixed;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 32px));
    z-index: 121;
}

.layout-widget-library[hidden] {
    display: none;
}

.layout-widget-library-head {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-width: 0;
}

.layout-widget-library-head strong {
    display: block;
    font-size: 18px;
    line-height: 1.15;
}

.layout-widget-library-head p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    margin: 4px 0 0;
}

.layout-widget-library-search {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: auto 1fr;
    min-width: 0;
    padding: 8px 10px;
}

.layout-widget-library-search input {
    background: transparent;
    border: 0;
    min-width: 0;
    padding: 0;
}

.layout-widget-library-tabs {
    background: color-mix(in srgb, var(--surface-2) 86%, transparent);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 3px;
    grid-template-columns: repeat(3, 1fr);
    padding: 3px;
}

.layout-widget-library-tab {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    min-height: 30px;
    padding: 5px 8px;
}

.layout-widget-library-tab.is-active {
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
    color: var(--text);
}

.layout-widget-filter-toggle {
    align-items: center;
    background: color-mix(in srgb, var(--surface-2) 76%, transparent);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    justify-self: start;
    min-height: 28px;
    padding: 4px 10px;
}

.layout-widget-filter-toggle.is-active {
    background: color-mix(in srgb, var(--accent) 16%, var(--surface-2));
    border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
    color: var(--text);
}

.layout-widget-filter-toggle[hidden] {
    display: none;
}

.layout-widget-library-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
    overflow: auto;
    padding: 1px 0 2px;
    scrollbar-width: thin;
}

.layout-widget-library-groups[hidden] {
    display: none;
}

.layout-widget-filter {
    align-items: center;
    background: color-mix(in srgb, var(--surface-2) 76%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 24px;
    padding: 4px 8px;
    width: auto;
}

.layout-widget-filter.is-active {
    background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
    border-color: color-mix(in srgb, var(--accent) 68%, var(--line));
    color: var(--text);
}

.layout-widget-library-list {
    display: grid;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
}

.layout-widget-add-card {
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr auto;
    min-width: 0;
    padding: 10px;
    text-align: left;
    width: 100%;
}

.layout-widget-add-card:not(.is-disabled) {
    cursor: grab;
}

.layout-widget-add-card:not(.is-disabled):active {
    cursor: grabbing;
}

.layout-widget-add-card:hover,
.layout-widget-add-card:focus-visible {
    border-color: var(--accent);
}

.layout-widget-add-card.is-adding {
    opacity: .72;
}

.layout-widget-add-card.was-added {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 48%, transparent);
}

.layout-widget-add-card.was-added .layout-widget-add-icon::after {
    content: "✓";
}

body.is-library-dragging .dashboard-grid.is-editing-layout {
    cursor: copy;
}

body.is-layout-editing .dashboard-grid,
body.is-library-dragging,
.layout-widget-library,
.layout-edit-bar,
.widget-header,
.widget-actions {
    -webkit-user-select: none;
    user-select: none;
}

body.is-layout-editing input,
body.is-layout-editing textarea,
body.is-layout-editing select,
body.is-layout-editing [contenteditable="true"],
.mail-view,
.email-body,
.email-rendered-body,
.note-item .preview,
.todo-group details,
.widget-custom-text {
    -webkit-user-select: text;
    user-select: text;
}

body.is-library-dragging .layout-widget-library {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(10px) scale(.98);
    transition: opacity .12s ease, transform .12s ease;
}

.layout-widget-add-card.was-added .layout-widget-add-icon::after {
    content: "OK";
    font-size: 11px;
}

.layout-widget-add-card.is-drag-source {
    opacity: .45;
}

.layout-widget-add-drag {
    align-items: center;
    background: color-mix(in srgb, var(--surface-hover) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    border-radius: 8px;
    color: var(--muted);
    display: inline-flex;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 17px;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    letter-spacing: -4px;
    padding-right: 4px;
    touch-action: none;
    width: 42px;
}

.layout-widget-add-card:not(.is-disabled):hover .layout-widget-add-drag,
.layout-widget-add-card:not(.is-disabled):focus-visible .layout-widget-add-drag {
    border-color: var(--accent);
    color: var(--accent);
}

.layout-widget-add-ghost {
    box-shadow: 0 12px 32px var(--shadow);
    left: 0;
    opacity: .94;
    pointer-events: none;
    position: fixed;
    top: 0;
    transform: translate3d(-9999px, -9999px, 0);
    z-index: 120;
}

.layout-widget-add-card.is-disabled {
    cursor: default;
    opacity: .72;
}

.layout-widget-add-card.is-disabled:hover,
.layout-widget-add-card.is-disabled:focus-visible {
    border-color: var(--line);
}

.layout-widget-add-icon {
    align-items: center;
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
    border-radius: 10px;
    color: var(--accent);
    display: inline-flex;
    font-size: 22px;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.layout-widget-add-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.layout-widget-add-text strong {
    line-height: 1.2;
}

.layout-widget-add-text small {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.layout-widget-add-text span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.layout-edit-bar.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.layout-edit-bar.is-saving {
    opacity: .78;
}

.layout-edit-bar.is-saving button {
    cursor: wait;
}

.layout-edit-bar[hidden] {
    display: flex;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 640px) {
    .layout-edit-bar {
        gap: 8px;
        justify-content: space-between;
        min-height: 66px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .layout-edit-status {
        font-size: 13px;
        max-width: 74px;
        white-space: nowrap;
    }

    .layout-edit-status-full {
        display: none;
    }

    .layout-edit-status-short {
        display: inline;
    }

    .layout-edit-icon-button {
        border-radius: 10px;
        gap: 0;
        height: 48px;
        justify-content: center;
        min-width: 48px;
        padding: 0;
        width: 48px;
    }

    .layout-edit-icon-button .button-label {
        display: none;
    }

    .layout-widget-library {
        border-radius: 14px 14px 0 0;
        bottom: calc(66px + env(safe-area-inset-bottom));
        left: 0;
        max-height: min(72vh, 620px);
        max-width: none;
        padding: 14px 14px 16px;
        right: 0;
        transform: none;
        width: auto;
    }

    body.is-library-dragging .layout-widget-library {
        transform: translateY(10px) scale(.98);
    }

    .layout-widget-library-head strong {
        font-size: 17px;
    }

    .layout-widget-library-head p {
        font-size: 12px;
    }

    .layout-widget-library-list {
        max-height: none;
    }

    .layout-widget-add-card {
        padding: 9px;
    }

    .layout-widget-add-drag {
        height: 46px;
        width: 46px;
    }
}

.dirty-edit-bar {
    align-items: center;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    border-top: 1px solid color-mix(in srgb, #f4b740 70%, transparent);
    bottom: 0;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
    display: flex;
    gap: 14px;
    justify-content: center;
    left: 0;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    transform: translateY(100%);
    transition: transform .18s ease, opacity .18s ease;
    z-index: 21;
}

.dirty-edit-bar.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.dirty-edit-bar[hidden] {
    display: flex;
    opacity: 0;
    pointer-events: none;
}

.dirty-edit-bar > div {
    display: flex;
    gap: 8px;
}

.dirty-edit-bar button {
    width: auto;
}

body.is-form-dirty::after {
    border: 2px solid #f4b740;
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: 20;
}

body.is-form-dirty .page {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

body.is-layout-editing::after {
    border: 2px solid var(--accent);
    border-radius: 0;
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: 110;
}

body.is-layout-editing .page {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

@media (max-width: 760px) {
    .dashboard-grid.dashboard-layout-desktop_grid.grid-stack {
        align-items: start;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-grid.dashboard-layout-desktop_grid.grid-stack > .grid-stack-item {
        height: auto;
        left: auto;
        position: relative;
        top: auto;
        width: auto;
    }

    .dashboard-grid.dashboard-layout-desktop_grid.grid-stack > .grid-stack-item > .grid-stack-item-content {
        inset: auto;
        overflow: visible;
        position: relative;
    }
}

.narrow {
    max-width: 440px;
    margin: 8vh auto;
}

.stack {
    display: grid;
    gap: 10px;
}

.compact {
    gap: 8px;
}

.row, .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.row > *,
.actions > * {
    flex: 1 1 160px;
    min-width: 0;
}

label {
    display: grid;
    gap: 5px;
    font-weight: 600;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    min-width: 0;
}

input, textarea, select, button, .button {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 6px;
    padding: 9px 10px;
    font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-width: 16px;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

legend {
    color: var(--muted);
    font-weight: 600;
}

.order-field {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 8px 26px;
}

.order-field input {
    max-width: 90px;
}

.field-hint {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 10px;
}

.location-result {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 6px;
    color: var(--accent);
    font-size: 14px;
    margin: 2px 0 0;
    padding: 9px 10px;
}

.widget-option-list {
    display: grid;
    gap: 8px;
}

.recommendation-box {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 10px;
    padding: 10px;
}

.recommendation-box p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.recommendation-box button {
    white-space: nowrap;
    width: auto;
}

.widget-option {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 8px;
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 10px;
}

.settings-drag-handle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: grab;
    display: inline-flex;
    font-size: 20px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    touch-action: none;
    width: 36px;
}

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

.widget-toggle {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.widget-toggle span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.widget-toggle small {
    color: var(--muted);
    font-weight: 500;
}

.widget-option .order-field {
    margin: 0;
    text-align: right;
}

.widget-option.is-dragging {
    opacity: .65;
}

.settings-grid {
    display: grid;
    gap: 18px;
    margin-inline: auto;
    max-width: 980px;
}

.settings-panel {
    padding: 0;
    overflow: hidden;
}

.settings-panel-head {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 5px;
    padding: 18px 18px 14px;
}

.settings-panel-head h2 {
    margin: 0;
}

.settings-panel-head p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.settings-form {
    display: grid;
    gap: 16px;
}

.settings-panel > .settings-form,
.settings-panel > .settings-section,
.settings-panel > .settings-account-list,
.settings-panel > .settings-account-card {
    margin: 16px;
}

.settings-section {
    background: color-mix(in srgb, var(--surface) 76%, transparent);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 13px;
    padding: 14px;
}

.settings-section h3 {
    font-size: 15px;
    margin: 0;
}

.settings-fields {
    display: grid;
    gap: 11px;
}

.settings-section .row {
    gap: 10px;
}

.location-settings {
    background: color-mix(in srgb, var(--panel) 72%, transparent);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.location-settings legend {
    color: var(--text);
    font-size: 13px;
    padding: 0 5px;
}

.settings-advanced {
    border-top: 1px solid var(--line);
    padding-top: 3px;
}

.settings-save {
    margin-top: 2px;
}

.settings-account-list {
    display: grid;
    gap: 12px;
}

.settings-account-card {
    background: color-mix(in srgb, var(--surface) 76%, transparent);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.settings-account-card > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    list-style: none;
    padding: 13px 14px;
}

.settings-account-card > summary::-webkit-details-marker {
    display: none;
}

.settings-account-card > summary span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.settings-account-card > form {
    border-top: 1px solid var(--line);
    padding: 14px;
}

.settings-account-card.add-account {
    margin-top: 12px;
}

.settings-account-card.add-account > summary span {
    align-items: center;
    background: var(--accent);
    border-radius: 999px;
    color: var(--accent-text);
    display: inline-flex;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.settings-grid .widget-option-list {
    gap: 10px;
}

.settings-grid .widget-option {
    border-radius: 8px;
}

.settings-grid .recommendation-box {
    border-radius: 8px;
    margin-bottom: 0;
}

.widget-page-link {
    color: var(--accent);
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    justify-self: start;
    margin-bottom: 2px;
    text-decoration: none;
}

.inline-create {
    margin: 4px 0 10px;
}

.inline-create > summary {
    align-items: center;
    background: var(--surface-hover);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    list-style: none;
    min-height: 40px;
    padding: 8px 12px;
}

.inline-create > summary::-webkit-details-marker {
    display: none;
}

.inline-create > summary span {
    align-items: center;
    background: var(--accent);
    border-radius: 999px;
    color: var(--accent-text);
    display: inline-flex;
    font-size: 18px;
    height: 22px;
    justify-content: center;
    line-height: 1;
    width: 22px;
}

.inline-create > form {
    margin-top: 10px;
}

.todo-overview {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.todo-overview span {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    display: grid;
    font-size: 11px;
    gap: 2px;
    min-width: 0;
    padding: 7px 8px;
}

.todo-overview strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1;
}

.todo-overview .is-alert {
    border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.todo-overview .is-alert strong {
    color: var(--danger);
}

.full-page-tool textarea {
    min-height: 140px;
}

.integration-options {
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding-top: 12px;
}

.board-picker {
    display: grid;
    gap: 10px;
}

.board-picker section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

.board-picker h3 {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.board-picker-head {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.board-picker-head h3 {
    margin: 0;
}

.board-picker-head div {
    display: flex;
    gap: 6px;
}

.tiny-button {
    background: var(--panel);
    border-color: var(--line);
    color: var(--muted);
    font-size: 12px;
    padding: 5px 8px;
    width: auto;
}

.board-option {
    min-height: 34px;
}

textarea {
    min-height: 70px;
    resize: vertical;
}

button, .button {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
    cursor: pointer;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

button.secondary, .secondary-link {
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--line);
}

button.danger {
    background: var(--danger);
    border-color: var(--danger);
}

.actions form {
    flex: 1 1 110px;
}

.item {
    border-top: 1px solid var(--line);
    padding-top: 12px;
    margin-top: 12px;
}

details.item[class*="todo-priority-"] {
    border-left: 4px solid var(--todo-priority-color, var(--line));
    padding-left: 10px;
}

.todo-priority-low {
    --todo-priority-color: #45df7e;
}

.todo-priority-normal {
    --todo-priority-color: #ffd43b;
}

.todo-priority-high {
    --todo-priority-color: #ff4d6d;
}

details.item summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 3px;
    grid-template-columns: 1fr;
    list-style-position: outside;
    min-height: 44px;
    padding: 4px 0;
}

details.item summary span {
    font-weight: 700;
    overflow-wrap: anywhere;
}

details.item summary small,
.meta {
    color: var(--muted);
}

details.item summary small {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
}

.due-label,
details.item summary time {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
    padding: 3px 7px;
}

.is-overdue .due-label {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
    border-color: color-mix(in srgb, var(--danger) 50%, transparent);
    color: var(--danger);
}

.is-due-today .due-label {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border-color: color-mix(in srgb, var(--accent) 50%, transparent);
    color: var(--accent);
}

.priority-label {
    background: color-mix(in srgb, var(--todo-priority-color, var(--accent)) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--todo-priority-color, var(--accent)) 60%, transparent);
    border-radius: 999px;
    color: var(--text);
    font-size: 11px;
    line-height: 1;
    padding: 3px 7px;
}

.details-body {
    display: grid;
    gap: 10px;
    padding-top: 8px;
}

.segmented {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 3px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 3px;
}

.segmented button {
    background: transparent;
    border: 0;
    color: var(--muted);
    padding: 7px 6px;
}

.segmented button.is-active {
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 1px 3px var(--shadow);
}

.todo-group {
    display: grid;
    gap: 8px;
}

.todo-group h3 {
    color: var(--muted);
    font-size: 13px;
    margin: 10px 0 0;
    text-transform: uppercase;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-list span {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    padding: 3px 8px;
}

.note-item {
    border-left: 4px solid transparent;
    padding-left: 10px;
}

.note-item.is-pinned {
    background: color-mix(in srgb, #f4b740 7%, transparent);
    border-left-color: #f4b740;
    border-radius: 6px;
}

.note-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 7px;
}

.note-pill {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
    padding: 3px 7px;
}

.note-pill.is-pinned {
    background: color-mix(in srgb, #f4b740 16%, transparent);
    border-color: color-mix(in srgb, #f4b740 52%, var(--line));
    color: #f4b740;
}

.archived-note {
    align-items: center;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 4px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-top: 10px;
}

.archived-note small {
    color: var(--muted);
}

.group-title {
    color: var(--muted);
    font-size: 13px;
    margin: 16px 0 2px;
    text-transform: uppercase;
}

.done {
    opacity: .62;
}

.is-overdue summary span {
    color: var(--danger);
}

.is-due-today summary span {
    color: var(--accent);
}

.empty, .error {
    color: var(--muted);
    background: var(--surface);
    padding: 10px;
    border-radius: 6px;
}

.error, .flash.error {
    color: var(--danger);
}

.flash {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 6px;
    color: var(--accent);
    padding: 10px 12px;
    margin-bottom: 14px;
}

.connection-status {
    background: var(--notice-bg);
    border: 1px solid var(--notice-border);
    border-radius: 6px;
    color: var(--notice-text);
    margin: 0 0 12px;
    padding: 10px 12px;
}

.now-card {
    display: grid;
    gap: 12px;
}

.now-date-line,
.now-week {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: 7px;
    justify-content: center;
    text-align: center;
}

.now-time {
    font-size: 56px;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
}

.clock-card {
    align-content: center;
    display: grid;
    gap: 12px;
    min-height: 100%;
}

.clock-time {
    font-size: 64px;
}

.weather-locations {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    padding-top: 12px;
}

.weather-location-form {
    display: none;
}

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

.weather-secondary-grid.is-single {
    grid-template-columns: 1fr;
}

.weather-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 8px;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.weather-card > * {
    position: relative;
    z-index: 1;
}

.weather-card::before {
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.2s ease;
}

.weather-card.weather-cold::before {
    background:
        radial-gradient(circle at 14% 2%, rgba(0, 229, 255, 0.68), transparent 38%),
        linear-gradient(135deg, rgba(0, 90, 255, 0.5), rgba(0, 210, 255, 0.3));
    opacity: 1;
}

.weather-card.weather-cold {
    border-color: rgba(0, 198, 255, 0.46);
}

.weather-card.weather-mild::before {
    background:
        radial-gradient(circle at 14% 2%, rgba(53, 255, 167, 0.66), transparent 38%),
        linear-gradient(135deg, rgba(0, 185, 143, 0.48), rgba(119, 255, 51, 0.28));
    opacity: 1;
}

.weather-card.weather-mild {
    border-color: rgba(57, 231, 151, 0.42);
}

.weather-card.weather-warm::before {
    background:
        radial-gradient(circle at 14% 2%, rgba(255, 231, 64, 0.72), transparent 38%),
        linear-gradient(135deg, rgba(255, 170, 0, 0.52), rgba(255, 68, 68, 0.3));
    opacity: 1;
}

.weather-card.weather-warm {
    border-color: rgba(255, 193, 36, 0.48);
}

.weather-card.weather-hot::before {
    background:
        radial-gradient(circle at 14% 2%, rgba(255, 0, 111, 0.7), transparent 40%),
        linear-gradient(135deg, rgba(255, 0, 84, 0.56), rgba(255, 132, 0, 0.34));
    opacity: 1;
}

.weather-card.weather-hot {
    border-color: rgba(255, 90, 91, 0.5);
}

.weather-card-current {
    padding: 12px;
}

.weather-card-head {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 13px;
    gap: 8px;
    justify-content: space-between;
}

.weather-card-head span {
    color: var(--text);
    font-weight: 700;
}

.weather-card-head small {
    color: var(--muted);
    font-size: 13px;
}

.weather-card.weather-cold,
.weather-card.weather-mild,
.weather-card.weather-warm,
.weather-card.weather-hot {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}

.weather-card.weather-cold .weather-card-head span,
.weather-card.weather-mild .weather-card-head span,
.weather-card.weather-warm .weather-card-head span,
.weather-card.weather-hot .weather-card-head span,
.weather-card.weather-cold .weather-temp,
.weather-card.weather-mild .weather-temp,
.weather-card.weather-warm .weather-temp,
.weather-card.weather-hot .weather-temp {
    color: #fff;
}

.weather-card.weather-cold .weather-card-head small,
.weather-card.weather-mild .weather-card-head small,
.weather-card.weather-warm .weather-card-head small,
.weather-card.weather-hot .weather-card-head small,
.weather-card.weather-cold .weather-metrics > span,
.weather-card.weather-mild .weather-metrics > span,
.weather-card.weather-warm .weather-metrics > span,
.weather-card.weather-hot .weather-metrics > span,
.weather-card.weather-cold .weather-moon,
.weather-card.weather-mild .weather-moon,
.weather-card.weather-warm .weather-moon,
.weather-card.weather-hot .weather-moon,
.weather-card.weather-cold .weather-sun,
.weather-card.weather-mild .weather-sun,
.weather-card.weather-warm .weather-sun,
.weather-card.weather-hot .weather-sun,
.weather-card.weather-cold .weather-follow,
.weather-card.weather-mild .weather-follow,
.weather-card.weather-warm .weather-follow,
.weather-card.weather-hot .weather-follow {
    color: rgba(255, 255, 255, 0.78);
}

.weather-temp {
    font-size: 34px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 1;
    text-align: center;
}

.weather-symbol {
    height: 34px;
    justify-self: center;
    margin: -2px 0 -4px;
    position: relative;
    width: 46px;
}

.weather-symbol::before,
.weather-symbol::after {
    content: "";
    position: absolute;
}

.weather-symbol-sun::before {
    background: #ffd43b;
    border-radius: 999px;
    box-shadow: 0 0 18px rgba(255, 212, 59, 0.56);
    height: 28px;
    left: 9px;
    top: 3px;
    width: 28px;
}

.weather-symbol-moon::before {
    background: radial-gradient(circle at 34% 30%, #f7fbff 0 4px, transparent 5px), radial-gradient(circle at 61% 58%, rgba(101, 133, 160, 0.42) 0 3px, transparent 4px), linear-gradient(135deg, #f6fbff 0%, #a9bfce 54%, #6f8ba1 100%);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(141, 181, 211, 0.4);
    height: 28px;
    left: 9px;
    top: 3px;
    width: 28px;
    -webkit-mask: radial-gradient(circle at 68% 42%, transparent 0 13px, #000 13.5px);
    mask: radial-gradient(circle at 68% 42%, transparent 0 13px, #000 13.5px);
}

.weather-symbol-moon::after {
    display: none;
}

.weather-symbol-mostly-sunny::before {
    background: #ffd43b;
    border-radius: 999px;
    box-shadow: 0 0 16px rgba(255, 212, 59, 0.5);
    height: 28px;
    left: 7px;
    top: 3px;
    width: 28px;
}

.weather-symbol-mostly-sunny::after {
    background: rgba(255, 255, 255, 0.86);
    border-radius: 999px;
    box-shadow: 5px 4px 0 -3px rgba(255, 255, 255, 0.86);
    height: 11px;
    left: 24px;
    top: 20px;
    width: 16px;
}

.weather-symbol-mostly-clear::before {
    background: radial-gradient(circle at 33% 32%, #f7fbff 0 3px, transparent 4px), radial-gradient(circle at 60% 58%, rgba(101, 133, 160, 0.4) 0 2px, transparent 3px), linear-gradient(135deg, #f6fbff 0%, #a9bfce 56%, #6f8ba1 100%);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(141, 181, 211, 0.36);
    height: 26px;
    left: 7px;
    top: 4px;
    width: 26px;
    -webkit-mask: radial-gradient(circle at 68% 42%, transparent 0 12px, #000 12.5px);
    mask: radial-gradient(circle at 68% 42%, transparent 0 12px, #000 12.5px);
}

.weather-symbol-mostly-clear::after {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    box-shadow: -4px 3px 0 -3px rgba(255, 255, 255, 0.88), 5px 3px 0 -3px rgba(255, 255, 255, 0.88);
    height: 9px;
    left: 25px;
    top: 21px;
    width: 13px;
}

.weather-symbol-cloud::before,
.weather-symbol-night-partly::after,
.weather-symbol-rain::before,
.weather-symbol-storm::before,
.weather-symbol-snow::before {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    box-shadow: -10px 6px 0 -3px rgba(255, 255, 255, 0.9), 10px 6px 0 -2px rgba(255, 255, 255, 0.9);
    height: 18px;
    left: 11px;
    top: 10px;
    width: 25px;
}

.weather-symbol-partly::after {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    box-shadow: -7px 5px 0 -4px rgba(255, 255, 255, 0.88), 8px 5px 0 -3px rgba(255, 255, 255, 0.88);
    height: 15px;
    left: 15px;
    top: 15px;
    width: 22px;
}

.weather-symbol-partly::before {
    background: #ffd43b;
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(255, 212, 59, 0.42);
    height: 24px;
    left: 5px;
    top: 3px;
    width: 24px;
}

.weather-symbol-night-partly::before {
    background: radial-gradient(circle at 34% 31%, #f7fbff 0 3px, transparent 4px), linear-gradient(135deg, #f6fbff 0%, #a9bfce 55%, #6f8ba1 100%);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(141, 181, 211, 0.36);
    height: 24px;
    left: 5px;
    top: 3px;
    width: 24px;
    -webkit-mask: radial-gradient(circle at 68% 42%, transparent 0 11px, #000 11.5px);
    mask: radial-gradient(circle at 68% 42%, transparent 0 11px, #000 11.5px);
}

.weather-symbol-rain::after {
    border-left: 2px solid rgba(96, 205, 255, 0.95);
    border-right: 2px solid rgba(96, 205, 255, 0.95);
    height: 10px;
    left: 20px;
    top: 24px;
    transform: skewX(-16deg);
    width: 10px;
}

.weather-symbol-storm::after {
    border-left: 5px solid transparent;
    border-right: 3px solid transparent;
    border-top: 15px solid #ffd43b;
    left: 22px;
    top: 22px;
    transform: skewX(-12deg);
}

.weather-symbol-snow::after {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    box-shadow: 8px 0 0 rgba(255, 255, 255, 0.92), 16px 0 0 rgba(255, 255, 255, 0.92);
    height: 4px;
    left: 13px;
    top: 28px;
    width: 4px;
}

.weather-symbol-unknown::before {
    background: rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    height: 8px;
    left: 19px;
    top: 13px;
    width: 8px;
}

.weather-card-current .weather-temp {
    font-size: 46px;
}

.weather-metrics {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    justify-content: center;
}

.weather-metrics > span {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 13px;
    gap: 5px;
}

.weather-health {
    display: grid;
    gap: 6px;
    margin: 8px 0 2px;
    width: 100%;
}

.weather-health[hidden] {
    display: none;
}

.weather-health-head {
    align-items: center;
    color: rgba(255, 255, 255, 0.76);
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    gap: 5px;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: uppercase;
}

.weather-health-head-icon,
.weather-health-icon {
    color: rgba(255, 255, 255, 0.76);
    display: inline-flex;
    flex: 0 0 auto;
    height: 14px;
    width: 14px;
}

.weather-health-head-icon svg,
.weather-health-icon svg {
    height: 14px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    fill: none;
    width: 14px;
}

.weather-health-grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weather-health-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.88);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 5px;
    min-width: 0;
    padding: 6px 8px;
}

.weather-health-item small {
    color: rgba(255, 255, 255, 0.66);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-health-item strong {
    font-size: 12px;
    line-height: 1.15;
}

@media (max-width: 520px) {
    .weather-health-grid {
        gap: 6px;
    }

    .weather-health-item {
        align-items: start;
        gap: 3px 6px;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "icon label"
            "icon value";
        padding: 7px 8px;
    }

    .weather-health-icon {
        grid-area: icon;
        margin-top: 1px;
    }

    .weather-health-item small {
        grid-area: label;
        white-space: normal;
    }

    .weather-health-item strong {
        grid-area: value;
        font-size: 13px;
        white-space: nowrap;
    }
}

.weather-health-primary {
    background: rgba(255, 255, 255, 0.14);
}

.weather-health-good {
    border-color: rgba(69, 211, 145, 0.36);
}

.weather-health-ok {
    border-color: rgba(240, 205, 85, 0.42);
}

.weather-health-warn,
.weather-health-bad {
    border-color: rgba(255, 137, 81, 0.48);
}

.weather-moon {
    align-items: center;
    color: var(--muted);
    display: grid;
    font-size: 13px;
    gap: 4px;
    justify-content: center;
    justify-items: center;
    line-height: 1.18;
    margin: 10px 0 12px;
    text-align: center;
    width: 100%;
}

.weather-moon[hidden] {
    display: none;
}

.weather-moon [data-weather-moon-label] {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.moon-illumination {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
}

.moon-phase {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.weather-sun {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    display: grid;
    gap: 5px;
    padding-top: 8px;
}

.weather-sun[hidden] {
    display: none;
}

.weather-sun div {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.weather-sun span {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 7px;
}

.weather-sun .weather-sun-golden {
    background: rgba(255, 184, 64, 0.2);
    border-color: rgba(255, 211, 111, 0.35);
    color: rgba(255, 240, 191, 0.96);
}

.weather-sun .weather-sun-blue {
    background: rgba(74, 147, 255, 0.18);
    border-color: rgba(126, 181, 255, 0.34);
    color: rgba(213, 231, 255, 0.96);
}

.weather-hourly {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    display: grid;
    gap: 7px;
    min-width: 0;
    padding-top: 9px;
    -webkit-user-select: none;
    user-select: none;
}

.weather-hourly[hidden] {
    display: none;
}

.weather-hourly-head {
    align-items: baseline;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.weather-hourly-head strong {
    font-size: 13px;
}

.weather-hourly-readout {
    align-items: center;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    gap: 6px;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    padding: 6px 7px;
    white-space: nowrap;
}

.weather-hourly-readout span {
    align-items: center;
    display: inline-flex;
    flex: 0 1 auto;
    gap: 3px;
    min-width: 0;
}

.weather-hourly-readout svg {
    flex: 0 0 14px;
    height: 14px;
    stroke: rgba(255, 255, 255, 0.72);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 14px;
}

.weather-hourly-readout svg * {
    fill: none;
}

.weather-hourly-summary {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weather-hourly-summary span {
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 6px 7px;
}

.weather-hourly-summary small {
    color: rgba(255, 255, 255, 0.62);
    font-size: 9px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-hourly-summary strong {
    color: rgba(255, 255, 255, 0.94);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-hourly-modes {
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 2px;
}

.weather-hourly-modes button {
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.68);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    min-height: 28px;
    padding: 4px 6px;
}

.weather-hourly-modes button.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.weather-hourly > svg {
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    cursor: crosshair;
    display: block;
    height: 130px;
    max-width: 100%;
    overflow: hidden;
    touch-action: none;
    width: 100%;
}

.weather-hourly-past {
    fill: rgba(255, 255, 255, 0.08);
}

.weather-hourly-grid {
    stroke: rgba(255, 255, 255, 0.13);
    stroke-width: 1;
}

.weather-hourly-grid-horizontal {
    stroke: rgba(255, 255, 255, 0.18);
}

.weather-hourly-label {
    fill: rgba(255, 255, 255, 0.64);
    font-family: inherit;
    font-stretch: normal;
    font-size: 10px;
    font-style: normal;
    font-variant: normal;
    font-weight: 700;
    text-anchor: middle;
}

.weather-hourly-scale,
.weather-hourly-unit {
    fill: rgba(255, 255, 255, 0.72);
    font-family: inherit;
    font-stretch: normal;
    font-size: 9px;
    font-style: normal;
    font-variant: normal;
    font-weight: 700;
}

.weather-hourly-scale-temp {
    text-anchor: end;
}

.weather-hourly-scale-percent,
.weather-hourly-unit {
    text-anchor: start;
}

.weather-hourly-unit {
    fill: rgba(255, 255, 255, 0.62);
    text-anchor: end;
}

.weather-hourly-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
    vector-effect: non-scaling-stroke;
}

.weather-hourly-line-temp {
    stroke: #ffffff;
}

.weather-hourly-line-humidity {
    stroke: #72ddff;
}

.weather-hourly-line-probability {
    stroke: #8ff0a4;
    stroke-dasharray: 4 4;
}

.weather-hourly-rainbar {
    fill: rgba(96, 205, 255, 0.64);
}

.weather-hourly-probabilitybar {
    fill: rgba(143, 240, 164, 0.34);
}

.weather-hourly-now {
    stroke: #ffcc4d;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.weather-hourly-scrub {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
    opacity: 0;
    stroke: #ffffff;
    stroke-width: 2.6;
    transition: opacity 650ms ease;
    vector-effect: non-scaling-stroke;
}

.weather-hourly-scrub.is-visible {
    opacity: 1;
    transition-duration: 90ms;
}

.weather-hourly-sun {
    stroke-width: 1.4;
    stroke-dasharray: 3 3;
    vector-effect: non-scaling-stroke;
}

.weather-hourly-sunrise {
    stroke: rgba(255, 212, 59, 0.85);
}

.weather-hourly-sunset {
    stroke: rgba(255, 127, 80, 0.86);
}

.weather-hourly-hit {
    cursor: pointer;
    fill: rgba(255, 255, 255, 0.001);
    pointer-events: all;
}

.weather-hourly-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    justify-content: center;
}

.weather-hourly-legend span {
    align-items: center;
    color: rgba(255, 255, 255, 0.72);
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    gap: 4px;
}

.weather-hourly-legend span::before {
    border-radius: 999px;
    content: "";
    height: 7px;
    width: 14px;
}

.weather-hourly-temp::before {
    background: #ffffff;
}

.weather-hourly-humidity::before {
    background: #72ddff;
}

.weather-hourly-probability::before {
    background: #8ff0a4;
}

.weather-hourly-amount::before {
    background: rgba(96, 205, 255, 0.64);
}

.weather-hourly.is-mode-temp .weather-hourly-line-humidity,
.weather-hourly.is-mode-temp .weather-hourly-line-probability,
.weather-hourly.is-mode-temp .weather-hourly-rainbar,
.weather-hourly.is-mode-temp .weather-hourly-scale-percent,
.weather-hourly.is-mode-temp .weather-hourly-unit,
.weather-hourly.is-mode-humidity .weather-hourly-line-temp,
.weather-hourly.is-mode-humidity .weather-hourly-line-probability,
.weather-hourly.is-mode-humidity .weather-hourly-rainbar,
.weather-hourly.is-mode-humidity .weather-hourly-scale-temp,
.weather-hourly.is-mode-humidity .weather-hourly-unit,
.weather-hourly.is-mode-rain .weather-hourly-line-temp,
.weather-hourly.is-mode-rain .weather-hourly-line-humidity,
.weather-hourly.is-mode-rain .weather-hourly-scale-temp {
    display: none;
}

.moon-icon {
    --moon-dark: 50%;
    --moon-lit: 50%;
    background: linear-gradient(135deg, #0d1b26 0%, #183040 100%);
    border: 1px solid rgba(183, 211, 231, 0.72);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(141, 181, 211, 0.24);
    display: inline-block;
    height: 20px;
    overflow: hidden;
    position: relative;
    width: 20px;
}

.moon-icon::before,
.moon-icon::after {
    border-radius: inherit;
    content: "";
    inset: 0;
    position: absolute;
}

.moon-icon::before {
    background: radial-gradient(circle at 33% 30%, rgba(255, 255, 255, 0.94) 0 2px, transparent 3px), linear-gradient(135deg, #f7fbff 0%, #b8ccd9 58%, #7f99ad 100%);
}

.moon-icon::after {
    background: linear-gradient(135deg, #0d1b26 0%, #183040 100%);
    opacity: 0.94;
}

.moon-new::before,
.moon-new::after {
    display: none;
}

.moon-waxing-crescent::before {
    left: auto;
    width: var(--moon-lit);
}

.moon-waxing-crescent::after {
    display: none;
}

.moon-first-quarter::before {
    clip-path: inset(0 0 0 50%);
}

.moon-first-quarter::after {
    display: none;
}

.moon-waxing-gibbous::after {
    border-radius: 999px 0 0 999px;
    right: auto;
    width: var(--moon-dark);
}

.moon-waning-gibbous::after {
    border-radius: 0 999px 999px 0;
    left: auto;
    width: var(--moon-dark);
}

.moon-last-quarter::before {
    clip-path: inset(0 50% 0 0);
}

.moon-last-quarter::after {
    display: none;
}

.moon-waning-crescent::before {
    right: auto;
    width: var(--moon-lit);
}

.moon-waning-crescent::after,
.moon-full::after {
    display: none;
}

.weather-location-help {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    padding-top: 8px;
}

.weather-location-help[hidden] {
    display: none;
}

.weather-location-help details {
    color: var(--muted);
    font-size: 13px;
}

.weather-location-help summary {
    cursor: pointer;
}

.weather-location-help p {
    margin: 6px 0 0;
}

.weather-follow {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    font-size: 13px;
    gap: 8px;
    justify-content: center;
    padding-top: 8px;
}

.forecast-strip {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 4px;
    padding-top: 12px;
}

.forecast-strip section {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 4px;
    text-align: center;
}

.forecast-icons {
    align-items: center;
    display: inline-flex;
    gap: 5px;
    justify-content: center;
    min-height: 26px;
}

.forecast-icons .weather-symbol {
    height: 26px;
    margin: 0;
    transform: scale(0.72);
    width: 34px;
}

.forecast-icons .moon-icon {
    height: 15px;
    width: 15px;
}

.mini-rain-icon {
    border: 1px solid currentColor;
    border-radius: 0 50% 50% 50%;
    display: inline-block;
    height: 8px;
    margin-right: 4px;
    transform: rotate(45deg);
    width: 8px;
}

.space-weather {
    display: grid;
    gap: 10px;
}

.space-weather-main {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    padding: 12px;
    position: relative;
}

.space-weather-main::before {
    content: "";
    inset: 0;
    opacity: 0.32;
    pointer-events: none;
    position: absolute;
}

.space-weather-quiet .space-weather-main::before {
    background: linear-gradient(135deg, rgba(0, 214, 255, 0.24), rgba(67, 255, 161, 0.18));
}

.space-weather-active .space-weather-main::before {
    background: linear-gradient(135deg, rgba(255, 199, 36, 0.34), rgba(255, 106, 0, 0.22));
}

.space-weather-storm .space-weather-main::before {
    background: linear-gradient(135deg, rgba(255, 0, 111, 0.4), rgba(139, 92, 246, 0.28));
}

.space-weather-main > * {
    position: relative;
    z-index: 1;
}

.space-weather-main span,
.space-weather-metrics small,
.space-weather-alerts small {
    color: var(--muted);
    font-size: 13px;
}

.space-weather-main div {
    display: grid;
    gap: 2px;
}

.space-weather-main strong {
    font-size: 19px;
}

.space-weather-main b {
    font-size: 30px;
    line-height: 1;
}

.space-weather-meter {
    grid-column: 1 / -1;
    height: 30px;
    margin-top: 4px;
    position: relative;
}

.space-weather-meter i {
    border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
    border-radius: 999px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28);
    display: block;
    height: 8px;
    left: 0;
    opacity: 0.92;
    position: absolute;
    right: 0;
    top: 5px;
}

.space-weather-meter-kp i {
    background: linear-gradient(90deg, #35d07f 0 36.7%, #e5c83b 36.7% 55.6%, #ff9f1c 55.6% 66.7%, #ff7a1c 66.7% 77.8%, #ff4d6d 77.8% 88.9%, #d946ef 88.9% 100%);
}

.space-weather-meter-wind i {
    background: linear-gradient(90deg, #35d07f 0 25%, #e5c83b 25% 50%, #ff9f1c 50% 75%, #ff4d6d 75% 100%);
}

.space-weather-meter-density i {
    background: linear-gradient(90deg, #35d07f 0 20%, #e5c83b 20% 40%, #ff9f1c 40% 80%, #ff4d6d 80% 100%);
}

.space-weather-meter b {
    background: var(--text);
    border: 2px solid var(--panel);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
    display: block;
    font-size: 0;
    height: 16px;
    line-height: 0;
    position: absolute;
    top: 1px;
    transform: translateX(-50%);
    width: 8px;
    z-index: 1;
}

.space-weather-meter em {
    color: var(--muted);
    display: flex;
    font-size: 10px;
    font-style: normal;
    justify-content: space-between;
    left: 0;
    line-height: 1;
    position: absolute;
    right: 0;
    top: 19px;
}

.space-weather-metrics {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.space-weather-metrics > span,
.space-weather-alerts article {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 2px;
    padding: 10px;
}

.space-weather-metrics > span {
    padding-bottom: 14px;
}

.space-weather-meter em span {
    background: none;
    border: 0;
    border-radius: 0;
    display: inline;
    padding: 0;
}

.space-weather-metrics .space-weather-meter {
    height: 24px;
    margin-top: 2px;
}

.space-weather-metrics .space-weather-meter em {
    font-size: 8px;
    top: 17px;
}

.space-weather-metrics .space-weather-meter b {
    height: 14px;
    width: 7px;
}

.space-weather-alerts article.space-weather-event {
    border-left: 4px solid var(--space-event-color, #53d769);
    overflow: hidden;
    padding-left: 12px;
    position: relative;
}

.space-weather-alerts article.space-weather-event::before {
    background: linear-gradient(90deg, var(--space-event-color, #53d769), transparent 65%);
    content: "";
    inset: 0;
    opacity: 0.12;
    pointer-events: none;
    position: absolute;
}

.space-weather-alerts article.space-weather-event > * {
    position: relative;
    z-index: 1;
}

.space-weather-alerts article.space-weather-event-alert {
    grid-template-columns: auto minmax(0, 1fr);
}

.space-weather-alerts article.space-weather-event-alert strong,
.space-weather-alerts article.space-weather-event-alert small {
    grid-column: 2;
}

.space-weather-alert-icon {
    align-items: center;
    background: var(--space-event-color, #ffd43b);
    clip-path: polygon(50% 7%, 95% 88%, 5% 88%);
    color: #101417;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    grid-row: 1 / span 2;
    height: 28px;
    justify-content: center;
    line-height: 1;
    padding-top: 6px;
    width: 30px;
}

.space-weather-event-minor {
    --space-event-color: #45df7e;
}

.space-weather-event-moderate {
    --space-event-color: #ffd43b;
}

.space-weather-event-strong {
    --space-event-color: #ff9f1c;
}

.space-weather-event-severe {
    --space-event-color: #ff4d6d;
}

.space-weather-severity {
    color: var(--space-event-color, #45df7e);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-right: 6px;
    text-transform: uppercase;
}

.space-weather-speed-scale {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 3px 0 1px;
}

.space-weather-speed {
    appearance: none;
    align-items: center;
    background: color-mix(in srgb, var(--space-event-color, #45df7e) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--space-event-color, #45df7e) 72%, transparent);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 3px;
    justify-content: center;
    line-height: 1;
    min-width: 42px;
    padding: 5px 7px;
    position: relative;
    text-align: center;
    width: auto;
}

.space-weather-speed-latest {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 60%, transparent);
}

.space-weather-speed-impact {
    background: color-mix(in srgb, var(--space-event-color, #ff9f1c) 34%, transparent);
}

.space-weather-speed-warning {
    align-items: center;
    background: #ff4d6d;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 9px;
    height: 14px;
    justify-content: center;
    margin-right: 3px;
    width: 14px;
}

.space-weather-speed-popover {
    display: none;
}

.space-weather-floating-tooltip {
    background: color-mix(in srgb, var(--surface) 96%, #000);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--text);
    display: grid;
    font-size: 12px;
    gap: 4px;
    line-height: 1.25;
    max-width: min(260px, calc(100vw - 24px));
    min-width: 190px;
    opacity: 0;
    padding: 9px 10px;
    pointer-events: none;
    position: fixed;
    text-align: left;
    transform: translateY(4px);
    transition: opacity 160ms ease, transform 160ms ease;
    visibility: hidden;
    z-index: 10000;
}

.space-weather-floating-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.space-weather-floating-tooltip b {
    color: var(--text);
}

.space-weather-floating-tooltip span {
    color: var(--muted);
}

.space-weather-arrival {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.space-weather-speed-scale + .space-weather-arrival {
    margin-top: 8px;
}

.space-weather-arrival b {
    color: var(--text);
    font-weight: 800;
}

.space-weather-arrival span {
    color: var(--muted);
}

.space-weather-alerts {
    display: grid;
    gap: 8px;
}

.forecast-strip span,
.forecast-strip small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.icon {
    display: inline-flex;
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
}

.icon svg {
    fill: none;
    height: 100%;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 100%;
}

.compact-empty {
    margin: 0;
    text-align: center;
}

.preview {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    background: var(--panel-soft);
}

.preview p:last-child {
    margin-bottom: 0;
}

.import-form {
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding-top: 12px;
}

.status-row {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 0;
}

.status-row.todo-status-row {
    background: color-mix(in srgb, var(--todo-priority-color, var(--surface)) 9%, transparent);
    border-left: 4px solid var(--todo-priority-color, var(--line));
    border-radius: 6px;
    border-top-color: color-mix(in srgb, var(--todo-priority-color, var(--line)) 34%, var(--line));
    min-height: 46px;
    padding: 8px 8px 8px 10px;
}

.status-row > div {
    min-width: 0;
}

.status-row p {
    color: var(--muted);
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.status-row.todo-status-row p {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 7px;
}

.status-row.holiday-row {
    background: color-mix(in srgb, #f4b740 8%, transparent);
    border-left: 4px solid #f4b740;
    border-radius: 6px;
    min-height: 46px;
    padding: 8px 8px 8px 10px;
}

.date-pill {
    align-items: center;
    background: color-mix(in srgb, #f4b740 14%, transparent);
    border: 1px solid color-mix(in srgb, #f4b740 46%, var(--line));
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 11px;
    gap: 5px;
    line-height: 1;
    padding: 4px 8px;
}

.event-meta-line {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.source-pill {
    align-items: center;
    background: var(--surface-hover);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 7px;
}

.source-google {
    background: rgba(66, 133, 244, 0.12);
    border-color: rgba(66, 133, 244, 0.24);
    color: #2f66c8;
}

.source-dashboard {
    background: rgba(33, 128, 112, 0.12);
    border-color: rgba(33, 128, 112, 0.22);
    color: var(--accent);
}

.event-list-item {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--text);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 54px;
    padding: 10px 0 10px 12px;
    position: relative;
    text-decoration: none;
}

.event-list-item::before {
    background: var(--accent);
    border-radius: 999px;
    bottom: 12px;
    content: "";
    left: 0;
    position: absolute;
    top: 12px;
    width: 4px;
}

.event-list-item.event-source-google::before {
    background: #4285f4;
}

.event-list-item.event-source-dashboard::before {
    background: var(--accent);
}

.event-list-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.event-list-main > span:first-child {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.widget-inline-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.widget-inline-actions form {
    margin: 0;
}

.event-detail-panel {
    display: grid;
    gap: 16px;
}

.event-detail-header {
    display: grid;
    gap: 8px;
}

.event-detail-header h2 {
    font-size: 32px;
    line-height: 1.12;
    margin: 0;
}

.event-facts {
    display: grid;
    gap: 10px;
}

.event-facts > div {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px;
}

.event-facts span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.event-facts strong,
.event-facts p {
    margin: 0;
    overflow-wrap: anywhere;
}

.event-edit-box {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.event-edit-box > summary {
    color: var(--accent);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.event-edit-box > summary::-webkit-details-marker {
    display: none;
}

.event-edit-box form {
    margin-top: 12px;
}

.email-summary {
    align-items: baseline;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.email-summary strong {
    font-size: 30px;
    line-height: 1;
}

.email-summary span,
.email-summary p {
    color: var(--muted);
    margin: 0;
}

.email-accounts {
    display: grid;
    gap: 8px;
}

.email-account {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 8px;
    padding-top: 12px;
}

.email-account-head {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.email-account-head span {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.email-message {
    color: var(--muted);
    border-radius: 6px;
    display: grid;
    font-size: 13px;
    gap: 3px;
    line-height: 1.25;
    margin: 0;
    overflow: hidden;
    padding: 7px 8px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.email-message:hover {
    background: color-mix(in srgb, var(--surface-strong) 70%, transparent);
}

.email-message:hover strong {
    color: var(--accent);
}

.email-message.is-viewed {
    color: #87939d;
}

.email-message.is-viewed strong {
    color: #65737e;
    font-weight: 500;
}

.email-message strong {
    color: var(--text);
    font-weight: 650;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-message-top {
    align-items: baseline;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.email-message-top time {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 12px;
}

.email-message-subject,
.email-message small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-message-icon {
    color: var(--muted);
    margin-right: 4px;
}

.email-message-icon.is-warning {
    color: #f4b740;
}

.email-inbox-view {
    display: grid;
    gap: 14px;
}

.inbox-toolbar {
    display: grid;
    gap: 10px;
}

.inbox-accounts,
.inbox-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inbox-accounts a,
.inbox-modes a {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 11px;
    text-decoration: none;
}

.inbox-accounts a.is-active,
.inbox-modes a.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-text);
}

.inbox-list {
    border-top: 1px solid var(--line);
    display: grid;
}

.inbox-row {
    border-bottom: 1px solid var(--line);
    color: var(--text);
    display: grid;
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 0;
    text-decoration: none;
}

.inbox-row:hover strong {
    color: var(--accent);
}

.inbox-row-main,
.inbox-row-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.inbox-row-main strong,
.inbox-row-main span,
.inbox-row-meta small,
.inbox-row-meta time {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-row-main strong {
    font-size: 15px;
    font-weight: 750;
}

.inbox-row-main span {
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
}

.inbox-row-meta {
    color: var(--muted);
    font-size: 12px;
    max-width: 180px;
    text-align: right;
}

.inbox-row.is-viewed .inbox-row-main strong,
.inbox-row.is-viewed .inbox-row-main span {
    color: var(--muted);
    font-weight: 550;
}

.inbox-row.is-unread .inbox-row-main strong::before {
    background: var(--accent);
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 7px;
    margin-right: 7px;
    vertical-align: 2px;
    width: 7px;
}

.inbox-pager {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.inbox-pager span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.mail-view {
    display: grid;
    gap: 14px;
}

.mail-header {
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.mail-header h2 {
    font-size: 23px;
    line-height: 1.25;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.mail-meta-grid {
    display: grid;
    gap: 10px 14px;
    grid-template-columns: minmax(0, 1fr);
}

.mail-meta-item {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    min-width: 0;
    padding: 8px 10px;
}

.mail-meta-grid span,
.mail-meta-grid small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    line-height: 1.25;
    text-decoration: none;
}

.mail-meta-grid strong {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.mail-meta-grid .mail-person {
    font-size: 17px;
    font-weight: 750;
}

.mail-meta-grid a,
.mail-meta-grid a[x-apple-data-detectors],
.mail-header a[x-apple-data-detectors],
.mail-view a[href^="mailto:"],
.mail-view [x-apple-data-detectors],
.mail-view [x-apple-data-detectors] * {
    color: inherit !important;
    font: inherit !important;
    text-decoration: none !important;
}

.mail-account,
.mail-body-title {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 4px;
}

.mail-body-title {
    margin-top: 2px;
}

.email-body {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: 14px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    margin: 0;
    max-height: 70vh;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
}

.email-rendered-body {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 420px;
    width: 100%;
}

.mail-view-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mail-view-tools button {
    width: auto;
}

.mail-view-mode.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-text);
}

.mail-load-images {
    justify-self: start;
    width: auto;
}

.mail-plain-text summary {
    color: var(--accent);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.mail-plain-text summary::-webkit-details-marker {
    display: none;
}

.mail-action-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mail-action {
    border: 0;
    border-radius: 8px;
    padding: 0;
}

.mail-action > summary {
    align-items: center;
    background: var(--accent);
    border-radius: 6px;
    color: var(--accent-text);
    cursor: pointer;
    display: flex;
    gap: 8px;
    font-weight: 700;
    justify-content: center;
    list-style: none;
    min-height: 42px;
    padding: 10px 12px;
    text-align: center;
}

.mail-action:nth-child(2) > summary {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--line);
}

.mail-action > summary::-webkit-details-marker {
    display: none;
}

.mail-action form {
    margin-top: 10px;
}

.calendar-source-row {
    padding: 8px 0;
}

.integration-summary {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 7px;
    margin: 10px 0;
    padding: 10px;
}

.integration-summary p {
    color: var(--muted);
    margin: 4px 0 0;
}

.trello-card {
    align-items: stretch;
    border-top: 1px solid var(--line);
    color: var(--text);
    display: grid;
    gap: 4px;
    min-height: 62px;
    padding: 10px 0 10px 12px;
    position: relative;
    text-decoration: none;
}

.trello-card::before {
    background: var(--line);
    border-radius: 999px;
    bottom: 12px;
    content: "";
    left: 0;
    position: absolute;
    top: 12px;
    width: 4px;
}

.trello-card:first-of-type {
    border-top: 0;
}

.trello-card strong {
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.trello-context,
.trello-meta {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 13px;
    gap: 6px;
    min-width: 0;
}

.trello-context {
    font-weight: 700;
}

.trello-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.trello-label {
    background: var(--surface);
    border-radius: 3px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    max-width: 100%;
    min-height: 18px;
    overflow: hidden;
    padding: 3px 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trello-label-green { background: #4bce97; color: #092016; }
.trello-label-yellow { background: #f5cd47; color: #241a00; }
.trello-label-orange { background: #fea362; color: #271000; }
.trello-label-red { background: #f87168; color: #2b0705; }
.trello-label-purple { background: #9f8fef; color: #160f3d; }
.trello-label-blue { background: #579dff; color: #061a37; }
.trello-label-sky { background: #6cc3e0; color: #04202b; }
.trello-label-lime { background: #94c748; color: #111f00; }
.trello-label-pink { background: #e774bb; color: #2b071c; }
.trello-label-black { background: #8590a2; color: #081017; }

.trello-card-label-green::before { background: #4bce97; }
.trello-card-label-yellow::before { background: #f5cd47; }
.trello-card-label-orange::before { background: #fea362; }
.trello-card-label-red::before { background: #f87168; }
.trello-card-label-purple::before { background: #9f8fef; }
.trello-card-label-blue::before { background: #579dff; }
.trello-card-label-sky::before { background: #6cc3e0; }
.trello-card-label-lime::before { background: #94c748; }
.trello-card-label-pink::before { background: #e774bb; }
.trello-card-label-black::before { background: #8590a2; }

.trello-context em {
    border-left: 1px solid var(--line);
    font-style: normal;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    padding-left: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trello-meta {
    flex-wrap: wrap;
}

.trello-meta > * {
    background: var(--surface);
    border-radius: 999px;
    padding: 2px 7px;
}

.trello-detail .trello-labels {
    margin: 0 0 12px;
}

.trello-open-original {
    margin-top: 14px;
}

.trello-checklists {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
}

.trello-checklists h3,
.trello-checklist h4 {
    margin: 0;
}

.trello-checklist {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.trello-checklist p {
    align-items: flex-start;
    display: grid;
    gap: 8px;
    grid-template-columns: 22px minmax(0, 1fr);
    margin: 0;
}

.trello-checklist p span {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--accent);
    display: inline-flex;
    height: 20px;
    justify-content: center;
    line-height: 1;
    width: 20px;
}

.trello-checklist p.is-complete {
    color: var(--muted);
}

.confluence-page {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--text);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 52px;
    padding: 9px 0;
    text-decoration: none;
}

.confluence-page:first-of-type {
    border-top: 0;
}

.confluence-page span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.confluence-page strong {
    overflow-wrap: anywhere;
}

.confluence-page small,
.confluence-page time {
    color: var(--muted);
    font-size: 13px;
}

.confluence-page time {
    flex: 0 0 auto;
    white-space: nowrap;
}

.confluence-excerpt {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 16px;
}

.confluence-excerpt h3 {
    margin-top: 0;
}

.calendar-more-list {
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding-top: 8px;
}

.calendar-more-list > summary {
    color: var(--accent);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    padding: 8px 0;
}

.calendar-more-list > summary::-webkit-details-marker {
    display: none;
}

.status-pill {
    border-radius: 999px;
    color: #fff;
    flex: 0 0 auto;
    font-size: 12px;
    padding: 4px 8px;
}

.status-ok {
    background: var(--accent);
}

.status-configured {
    background: #5b6f8a;
}

.status-error,
.status-unavailable {
    background: var(--danger);
}

.small-button {
    width: auto;
}

.today-section + .today-section {
    margin-top: 12px;
}

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

.forecast-grid.is-single {
    grid-template-columns: 1fr;
}

.forecast-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

.forecast-card p {
    color: var(--muted);
    margin: 4px 0 0;
}

.calendar-panel {
    overflow-x: auto;
}

.calendar-agenda {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.section-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.section-heading h2 {
    margin: 0;
}

.agenda-group + .agenda-group {
    margin-top: 8px;
}

.calendar-weekdays,
.calendar-month {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    min-width: 840px;
}

.calendar-weekdays {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
}

.calendar-day {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    min-height: 112px;
    padding: 8px;
}

.calendar-day.is-muted {
    opacity: .55;
}

.calendar-day.is-today {
    border-color: var(--accent);
}

.calendar-day-number {
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.calendar-event {
    background: var(--surface-hover);
    border-radius: 5px;
    color: var(--text);
    display: grid;
    gap: 2px;
    margin-top: 5px;
    padding: 5px;
    text-decoration: none;
}

.calendar-event > span {
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.calendar-event small,
.calendar-more {
    color: var(--muted);
    font-size: 12px;
}

.calendar-create {
    margin-top: 16px;
}

@media (max-width: 760px) {
    .page {
        width: min(100% - 20px, 1180px);
        padding: calc(6px + env(safe-area-inset-top, 0px)) 0 calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .appbar {
        align-items: flex-start;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .appbar-compact {
        align-items: flex-start;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .top-actions {
        margin-left: auto;
    }

    .page-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-content: stretch;
    }

    .page-actions .button {
        width: 100%;
    }

    .topnav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-content: stretch;
    }

    .topnav .button,
    .topnav form,
    .topnav button {
        width: 100%;
    }

    .row,
    .actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .status-row {
        align-items: stretch;
        flex-direction: column;
    }

    .status-pill,
    .small-button {
        align-self: flex-start;
    }

    .forecast-grid {
        grid-template-columns: 1fr;
    }

    .mail-action-grid {
        grid-template-columns: 1fr;
    }

    .inbox-row {
        grid-template-columns: 1fr;
    }

    .inbox-row-meta {
        max-width: none;
        text-align: left;
    }

    .inbox-pager {
        align-items: stretch;
    }

    .order-field {
        margin-left: 0;
    }

    .widget-option {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .recommendation-box {
        grid-template-columns: 1fr;
    }

    .recommendation-box button {
        width: 100%;
    }

    .settings-grid {
        gap: 14px;
    }

    .settings-panel-head {
        padding: 16px 14px 12px;
    }

    .settings-panel > .settings-form,
    .settings-panel > .settings-section,
    .settings-panel > .settings-account-list,
    .settings-panel > .settings-account-card {
        margin: 12px;
    }

    .settings-section {
        gap: 12px;
        padding: 12px;
    }

    .settings-account-card > summary {
        padding: 12px;
    }

    .settings-account-card > form {
        padding: 12px;
    }

    .now-time {
        font-size: 48px;
    }

    .weather-secondary-grid {
        grid-template-columns: 1fr;
    }

    .calendar-weekdays,
    .calendar-month {
        grid-template-columns: repeat(7, minmax(96px, 1fr));
        min-width: 672px;
    }

    .calendar-day {
        min-height: 96px;
    }
}
