
@font-face {
    font-family: "DM Sans";
    src: url("/fonts/DMSans-VariableFont_opsz,wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url("/fonts/DMSans-Italic-VariableFont_opsz,wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Fraunces";
    src: url("/fonts/Fraunces-VariableFont_SOFT,WONK,opsz,wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Fraunces";
    src: url("/fonts/Fraunces-Italic-VariableFont_SOFT,WONK,opsz,wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("/fonts/Montserrat-Italic-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root,
html[data-theme="light"] {
    --font-ui: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --bg: #faf6f0;
    --surface: #fffdf8;
    --surface-elevated: #fffdf8;
    --surface-muted: #fff9f2;
    --surface-glass: #fffdf8;
    --surface-panel: #fffdf8;
    --surface-faint: #f5efe6;
    --soft: #f0e9df;
    --text: #2d4a3e;
    --muted: #5f7268;
    --quiet: #8a968f;
    --line: #e8dfd3;
    --primary: #c4785a;
    --primary-strong: #a86145;
    --primary-soft: #f3e4dc;
    --primary-ring: color-mix(in srgb, var(--primary) 20%, transparent);
    --primary-shadow: color-mix(in srgb, var(--primary) 22%, transparent);
    --green: #7a9e8e;
    --success-bg: #e8f0eb;
    --success-border: #b8cfc3;
    --highlight-bg: #f4efe8;
    --rose: #c4785a;
    --danger: #b85c6f;
    --cream: #faf6f0;
    --badge-bg: #f5efe6;
    --overlay: rgba(45, 74, 62, 0.32);
    --shadow: 0 1px 0 color-mix(in srgb, var(--line) 80%, transparent);
    --card-shadow: 0 1px 0 color-mix(in srgb, var(--line) 65%, transparent);
    --soft-shadow: 0 1px 0 color-mix(in srgb, var(--line) 50%, transparent);
    --gradient-warm: transparent;
    --gradient-cool: transparent;
    --on-primary: #fffdf8;
    --theme-color-meta: #faf6f0;
    --editorial-radius: 12px;
    --editorial-radius-sm: 8px;
    --editorial-radius-xs: 6px;
    --motion-pop: cubic-bezier(0.34, 1.2, 0.64, 1);
    --motion-exit: cubic-bezier(0.4, 0, 0.2, 1);
    --motion-duration-fast: 180ms;
    --motion-duration-exit: 280ms;
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
}


* { box-sizing: border-box; }

html {
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

@media (max-width: 860px) {
    html {
        scrollbar-gutter: auto;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg);
}

body.is-app {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--soft) 42%, transparent), transparent 120px),
        var(--bg);
}

body.is-scroll-locked,
body.has-open-modal {
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}

body.is-booting:not(.is-landing):not(.is-auth):not(.is-app) .shell,
html.boot-app:not(.is-ready) body.is-app .shell {
    opacity: 0;
}

body.is-landing .shell,
body.is-home .shell,
body.is-auth .shell,
body.is-app .shell {
    opacity: 1;
}


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

.shell {
    width: min(100%, 1040px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 22px;
    gap: 34px;
}

body.is-auth .shell {
    padding-top: 0;
    padding-bottom: 0;
}

body.is-app .shell {
    width: min(100%, 760px);
    padding: 18px 14px;
    gap: 18px;
}

body.is-auth .shell {
    width: min(100%, 1040px);
}

body.is-app .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

body.is-app .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

body.is-app .logo {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: block;
    border-radius: 12px;
    object-fit: cover;
}

body.is-app .brand-title {
    display: block;
    color: var(--text);
    font-weight: 600;
    font-size: 1.08rem;
    letter-spacing: 0;
}

body.is-app .brand-claim {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}


body.is-app .site-nav {
    display: none;
}

body.is-app .site-menu-button {
    display: none;
}

body.is-auth .hero.app-entry {
    display: block;
    padding: 0;
}

body.is-auth .app-entry .panel {
    width: min(100%, 430px);
    margin: 0 auto;
}

body.is-auth .panel-head {
    display: block;
    width: 100%;
    margin-bottom: 18px;
}

body.is-auth .panel-head .logo {
    display: none;
}

body.is-auth .panel-head > div {
    width: 100%;
    min-width: 0;
}

body.is-auth .panel-title {
    font-size: clamp(1.4rem, 5.2vw, 1.65rem);
}

body.is-auth .panel-text {
    max-width: none;
}

.app-shell-root {
    display: grid;
    gap: 12px;
    align-content: start;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
    gap: clamp(28px, 6vw, 68px);
    align-items: center;
}

body.is-app .hero {
    display: block;
    padding: 0;
}

body.is-landing .panel,
body.is-landing .app-spa-dormant {
    display: none !important;
}

body.is-auth .hero {
    grid-template-columns: minmax(330px, 430px);
    justify-content: center;
}

body.is-auth .copy {
    display: none;
}

body.is-app .copy {
    display: none;
}

body.is-app .panel {
    max-width: none;
}

body.is-app .topbar {
    justify-content: space-between;
}

.app-menu {
    position: relative;
    display: none;
}

body.is-app .app-menu {
    display: block;
    position: relative;
    z-index: 201;
    pointer-events: auto;
}

.menu-button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}

.menu-overlay[hidden] {
    display: none !important;
}

.menu-sheet {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
}

.menu-sheet-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: start;
    gap: 10px 12px;
    flex-shrink: 0;
    padding:
        max(16px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        14px
        max(16px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
}

.menu-sheet-brand {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.menu-sheet-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.menu-sheet-space {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}

.menu-sheet-version {
    align-self: center;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.menu-sheet-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.menu-sheet-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding:
        12px
        max(16px, env(safe-area-inset-right))
        16px
        max(16px, env(safe-area-inset-left));
    display: grid;
    gap: 16px;
    align-content: start;
}

.menu-sheet-foot {
    flex-shrink: 0;
    padding:
        10px
        max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
}

.menu-sheet-logout {
    width: 100%;
}

.menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: default;
}

.menu-row-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    color: var(--muted);
}

.menu-row-icon svg {
    display: block;
    width: 24px;
    height: 24px;
}

.menu-row-label {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.menu-row-value {
    flex: 0 1 auto;
    max-width: 46%;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: right;
    overflow-wrap: anywhere;
}

.menu-row-value-color {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 24px;
    min-height: 24px;
}

.menu-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface) 40%, transparent);
}

.menu-row-value-muted {
    font-size: 0.88rem;
}

.menu-row-chevron {
    flex: 0 0 auto;
    color: var(--quiet);
    font-size: 1.25rem;
    line-height: 1;
}

.menu-title {
    margin: 4px 6px 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.menu-hint {
    margin: -2px 6px 4px;
    padding: 0 4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
}

.menu-group {
    display: grid;
    gap: 4px;
    border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
    padding-top: 12px;
}

.menu-sheet-body .menu-group:first-child {
    border-top: 0;
    padding-top: 0;
}

.menu-group-title {
    margin: 0 10px 6px;
    color: var(--quiet);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    padding:
        max(10px, env(safe-area-inset-top))
        max(14px, env(safe-area-inset-right))
        10px
        max(14px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--danger) 12%, var(--surface));
    border-bottom: 1px solid color-mix(in srgb, var(--danger) 28%, var(--line));
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

body.is-offline.is-app .topbar {
    top: calc(max(14px, env(safe-area-inset-top)) + 38px);
}

.menu-row-action {
    cursor: pointer;
}

.menu-row-action:hover,
.menu-row-action:focus-visible {
    background: var(--soft);
}

.menu-row-static {
    cursor: default;
}

.menu-row-logout {
    width: 100%;
}

.menu-row-logout .menu-row-label {
    color: var(--danger);
}

.menu-row-logout .menu-row-icon {
    color: var(--danger);
}

.menu-inline-block {
    padding: 4px 12px 12px;
}

.menu-inline-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
}

.menu-inline-label {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.menu-theme-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-left: 36px;
}

.menu-theme-option {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.menu-theme-option.is-active {
    border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    color: var(--text);
}

.menu-theme-option:hover,
.menu-theme-option:focus-visible {
    background: var(--soft);
}

.menu-inline-block--color .menu-color-palette {
    margin-top: 4px;
    padding-left: 36px;
}

.menu-inline-block--color .menu-color-palette .color-grid {
    position: static;
    width: 100%;
    margin-top: 8px;
    border: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
}

.menu-inline-block--color .menu-color-palette:not(.is-open) .color-grid {
    display: none;
}

.menu-inline-block--color .menu-color-palette.is-open .color-grid {
    display: grid;
}

.menu-item {
    min-height: 40px;
    border: 0;
    border-radius: 12px;
    padding: 0 11px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-weight: 600;
    cursor: pointer;
}

.menu-item:hover {
    background: var(--soft);
}

.menu-item.is-danger {
    color: var(--danger);
}

.menu-select {
    display: grid;
    gap: 6px;
    border-top: 1px solid var(--line);
    padding: 10px 8px 4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.menu-select select {
    min-height: 40px;
    border-radius: 12px;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
}

.app-modal-form .field-row-upload {
    align-items: start;
    min-height: 0;
}

.app-modal-form .field-row-upload > label {
    padding-top: 0;
    min-height: var(--field-height);
}

.app-modal-form .field-row-upload .file-upload-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.app-modal-form .field-row-upload .file-upload-row input[type="file"] {
    min-height: var(--field-height);
    height: auto;
    padding: 6px 10px;
    font-size: var(--field-font-size);
    border-radius: var(--field-radius);
}

.app-modal-form .field-row-upload .file-upload-row .secondary {
    min-height: var(--field-height);
    height: var(--field-height);
    padding: 0 12px;
    font-size: var(--field-font-size);
    border-radius: var(--field-radius);
}

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

.settings-info {
    display: grid;
    gap: 8px;
    border-radius: 16px;
    padding: 12px;
    background: var(--soft);
}

.check-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.45;
    text-transform: none;
    letter-spacing: 0;
}

.check-consent input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 2px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    place-items: center;
    padding: 18px;
    background: var(--overlay);
}

.modal.is-open {
    display: grid;
}

.modal.is-stacked {
    z-index: 130;
}

.modal.is-open:not(.is-closing) .modal-card {
    animation: dt-modal-card-in 220ms var(--motion-pop);
}

.modal.is-closing .modal-card {
    animation: dt-modal-card-out 180ms ease forwards;
}

@keyframes dt-modal-card-in {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes dt-modal-card-out {
    from {
        opacity: 1;
        transform: none;
    }

    to {
        opacity: 0;
        transform: scale(0.98) translateY(6px);
    }
}

.modal-card {
    width: min(100%, 520px);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.modal-form {
    display: grid;
    gap: 10px;
}

.app-modal-form {
    --field-height: 36px;
    --field-font-size: 0.875rem;
    --field-radius: 11px;
}

.app-modal-form .field-row {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: var(--field-height);
}

.app-modal-form .field-row > label {
    display: flex;
    align-items: center;
    min-height: var(--field-height);
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.app-modal-form .field-row .field-control,
.app-modal-form .field-row > input,
.app-modal-form .field-row > select {
    min-width: 0;
    width: 100%;
}

.app-modal-form .field-row-short input {
    width: 100%;
    max-width: 88px;
}

.app-modal-form .field-row:has(.setup-note) {
    align-items: start;
    min-height: auto;
    row-gap: 8px;
}

.app-modal-form .field-row .setup-note {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
}

.app-modal-form .field-stack {
    display: grid;
    gap: 7px;
}

.app-modal-form .field-stack > label {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.app-modal-form input:not([type="file"]),
.app-modal-form select {
    min-height: var(--field-height);
    height: var(--field-height);
    border-radius: var(--field-radius);
    padding: 0 11px;
    font-size: var(--field-font-size);
    font-weight: 600;
    line-height: 1.2;
}

.app-modal-form textarea {
    min-height: 96px;
    padding: 10px 11px;
    border-radius: var(--field-radius);
    font-size: var(--field-font-size);
    font-weight: 600;
    line-height: 1.4;
}

.app-modal-form .color-palette--bars .color-current {
    height: var(--field-height);
    min-height: var(--field-height);
    border-radius: var(--field-radius);
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.modal-text {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.45;
    font-weight: 600;
}

.close-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.modal-actions.single-action {
    grid-template-columns: 1fr;
}

.modal-content {
    display: grid;
    gap: 12px;
    max-height: min(52vh, 460px);
    overflow: auto;
    color: var(--muted);
    line-height: 1.65;
}

.modal-content p {
    margin: 0;
}

.member-edit-list {
    display: grid;
    gap: 12px;
    margin-top: 13px;
}

.member-edit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px 58px;
    gap: 10px;
    align-items: end;
    border-radius: 16px;
    padding: 12px;
    background: var(--soft);
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.password-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: -4px;
}

.password-rules span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 9px;
    background: var(--soft);
    color: var(--quiet);
    font-size: 0.73rem;
    font-weight: 600;
}

.password-rules span.is-valid {
    background: var(--success-bg);
    color: var(--primary-strong);
}

.add-row {
    margin-top: -4px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 0.42fr) auto;
    gap: 10px;
    align-items: end;
}

.setup-step .add-row,
.modal-add-row.add-row {
    grid-template-columns: minmax(0, 1fr) minmax(116px, 152px);
    gap: 10px 12px;
}

.setup-step .add-row > button,
.modal-add-row.add-row > button {
    grid-column: 1 / -1;
}

@media (min-width: 620px) {
    .setup-step .add-row,
    .modal-add-row.add-row {
        grid-template-columns: minmax(0, 1fr) minmax(116px, 152px) auto;
    }

    .setup-step .add-row > button,
    .modal-add-row.add-row > button {
        grid-column: auto;
        min-width: 148px;
        white-space: nowrap;
    }
}

.add-row .setup-step-head {
    grid-column: 1 / -1;
}

/* Setup Schritt 3: immer untereinander, damit Felder gut klickbar bleiben */
.setup-step[data-setup-step="3"] .add-row {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
}

.setup-step[data-setup-step="3"] .add-row > label,
.setup-step[data-setup-step="3"] .add-row > button {
    grid-column: 1 / -1;
}

.modal-add-row {
    margin-top: 0;
    margin-bottom: 0;
}

.checklist-add-panel {
    margin-bottom: 14px;
}

.checklist-add-toggle {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px;
    text-align: left;
    font-weight: 600;
}

.checklist-add-toggle::after {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.72;
    transition: transform 0.18s ease;
}

.checklist-add-panel.is-expanded .checklist-add-toggle::after {
    transform: rotate(-135deg);
}

.checklist-add-body {
    margin-top: 10px;
}

.quick-member-select {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    align-self: end;
    min-height: 46px;
    border-radius: 14px;
    padding: 10px 12px;
    background: var(--soft);
}

.quick-member-select > span {
    flex: 0 0 100%;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.setup-step .quick-member-select {
    gap: 9px 10px;
    min-height: 52px;
    padding: 10px 12px;
}

.setup-step .quick-member-select > span {
    margin-bottom: 1px;
    font-size: 0.68rem;
}

.setup-step .quick-member-select .member-choice {
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.setup-items {
    display: grid;
    gap: 8px;
}

.setup-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 4px;
}

.setup-progress span {
    position: relative;
    min-height: 34px;
    display: grid;
    grid-template-columns: auto;
    gap: 2px;
    place-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--soft);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}

.setup-progress span.is-active {
    background: color-mix(in srgb, var(--primary) 24%, var(--soft));
    color: var(--text);
}

.setup-progress span.is-done {
    background: color-mix(in srgb, var(--green) 22%, var(--soft));
}

.setup-progress span:not(:last-child)::after {
    content: ">";
    position: absolute;
    top: 50%;
    right: -10px;
    color: var(--quiet);
    font-size: 0.72rem;
    transform: translateY(-50%);
}

.setup-progress b {
    display: block;
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.setup-progress em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.72rem;
}

.setup-step {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: var(--surface-faint);
}

.setup-step:not(.is-active) {
    display: none;
}

.setup-step-head {
    display: grid;
    gap: 4px;
}

.setup-step h3,
.setup-title {
    margin: 0;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 600;
}

.setup-step-head p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.setup-note,
.setup-empty {
    margin: 0;
    border-radius: 14px;
    padding: 11px 12px;
    background: color-mix(in srgb, var(--soft) 72%, var(--surface));
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.member-setup-card {
    border-radius: 16px;
    padding: 12px;
    background: color-mix(in srgb, var(--soft) 62%, var(--surface));
}

.setup-item {
    min-height: 44px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    gap: 8px;
    border-radius: 14px;
    padding: 7px 8px 7px 13px;
    background: var(--soft);
    color: var(--text);
    font-weight: 600;
}

.setup-item > span small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 400;
}

.editable-category-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin: 8px 0 2px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reorder-actions,
.editable-item-tools {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.editable-item-tools {
    justify-self: end;
}

.reorder-actions button,
.editable-item-tools button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
}

.reorder-actions button:disabled,
.editable-item-tools button:disabled {
    cursor: default;
    opacity: 0.35;
}

.editable-item {
    grid-template-columns: 1fr;
    padding: 0;
    overflow: hidden;
}

.editable-item-main {
    min-height: 44px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 7px 8px 7px 13px;
}

.editable-item-main small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 400;
}

.editable-item-panel {
    display: none;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding: 11px 12px 12px;
    background: color-mix(in srgb, var(--surface) 64%, var(--soft));
}

.editable-item.is-editing .editable-item-panel {
    display: grid;
}

.editable-item-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.weekday-grid,
.member-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.weekday-grid.is-hidden {
    display: none;
}

.weekday-choice,
.member-choice {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    user-select: none;
}

.weekday-choice input,
.member-choice input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    flex: 0 0 16px;
    accent-color: var(--member-color, var(--primary));
}

.member-choice:has(input:checked) {
    border-color: color-mix(in srgb, var(--member-color, var(--primary)) 42%, var(--line));
    background: color-mix(in srgb, var(--member-color, var(--primary)) 12%, var(--surface));
}

.setup-item button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 11px;
    background: var(--surface);
    color: var(--danger);
    cursor: pointer;
    font-weight: 600;
}

.setup-item .editable-item-tools button,
.editable-category-head .reorder-actions button {
    width: 30px;
    height: 30px;
    color: var(--text);
}

.editable-item-actions button {
    width: auto;
    min-height: 38px;
    border-radius: 12px;
    padding: 0 10px;
}

.editable-item-actions .primary {
    background: var(--primary);
    color: var(--on-primary);
}

.editable-item-actions .secondary {
    background: var(--surface);
    color: var(--text);
}

.editable-item-actions .danger {
    background: color-mix(in srgb, var(--danger) 13%, var(--surface));
    color: var(--danger);
}

.setup-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.52fr) minmax(0, 1fr);
    gap: 10px;
}

.setup-actions .primary,
.setup-actions .secondary {
    width: 100%;
}

.setup-actions #setupButton {
    grid-column: 2;
}

.setup-actions #setupButton[hidden],
.setup-actions #setupNextButton[hidden],
.setup-actions #setupPrevButton[hidden] {
    display: none;
}







.calendar-nav {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    gap: 10px;
    align-items: center;
    margin-bottom: 13px;
}

.calendar-nav strong {
    text-align: center;
    font-size: 1.08rem;
    font-weight: 600;
}

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

.calendar-weekdays {
    margin-bottom: 8px;
    color: var(--quiet);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
}

.calendar-day {
    position: relative;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
}

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

.calendar-day.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.calendar-day.is-complete {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.calendar-day.has-progress::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translateX(-50%);
    background: var(--primary);
}

.modal.modal--sheet .report-modal-card {
    max-width: none;
}

.report-modal-card {
    max-width: 560px;
}

.report-range-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.report-range-tab {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

.report-range-tab.is-active {
    border-color: var(--primary);
    background: var(--primary-soft, var(--badge-bg));
    color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.report-nav {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.report-nav strong {
    text-align: center;
    font-size: 1.02rem;
    font-weight: 600;
}

.report-body {
    display: grid;
    gap: 16px;
}

.report-hero {
    padding: 18px 18px 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--badge-bg) 100%);
}

.report-hero-kicker {
    margin: 0 0 6px;
    color: var(--quiet);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-hero-percent {
    margin: 0;
    color: var(--primary);
    font-size: clamp(2.4rem, 8vw, 3.2rem);
    font-weight: 700;
    line-height: 1;
}

.report-hero-copy {
    margin: 10px 0 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.45;
}

.report-hero-meta {
    margin: 10px 0 0;
    color: var(--quiet);
    font-size: 0.88rem;
}

.report-panel {
    padding: 14px 0 2px;
}

.report-panel.is-hidden {
    display: none;
}

.report-panel-title {
    margin: 0 0 12px;
    font-size: 0.92rem;
    font-weight: 600;
}

.report-panel-meta {
    margin: 10px 0 0;
    color: var(--quiet);
    font-size: 0.86rem;
}

.report-week-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    min-height: 150px;
}

.report-week-bar {
    display: grid;
    gap: 8px;
    justify-items: center;
    min-width: 0;
}

.report-week-bar-track {
    display: flex;
    align-items: flex-end;
    width: 100%;
    max-width: 34px;
    height: 110px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
}

.report-week-bar-fill {
    width: 100%;
    border-radius: 999px 999px 0 0;
    background: var(--primary);
    transition: height 0.2s ease;
}

.report-week-bar.is-muted .report-week-bar-track {
    opacity: 0.35;
}

.report-week-bar.is-empty .report-week-bar-fill {
    height: 0 !important;
    background: transparent;
}

.report-week-bar-label,
.report-week-bar-value {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--quiet);
    text-align: center;
}

.report-week-bar-value {
    color: var(--text);
}

.report-heatmap .report-heat-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    cursor: default;
}

.report-heat-day.is-outside {
    opacity: 0.28;
}

.report-heat-day.is-before-space {
    opacity: 0.35;
    background: var(--surface);
}

.report-heat-day.is-future,
.report-week-bar.is-future .report-week-bar-track {
    opacity: 0.42;
    border-style: dashed;
    background: var(--surface);
}

.report-week-bar.is-future .report-week-bar-fill {
    height: 0 !important;
    background: transparent;
}

.report-heat-day.is-low {
    background: color-mix(in srgb, var(--primary) 18%, var(--surface));
    border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}

.report-heat-day.is-mid {
    background: color-mix(in srgb, var(--primary) 38%, var(--surface));
    border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
}

.report-heat-day.is-high {
    background: color-mix(in srgb, var(--primary) 58%, var(--surface));
    border-color: color-mix(in srgb, var(--primary) 62%, var(--line));
}

.report-heat-day.is-complete {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.report-highlights {
    display: grid;
    gap: 10px;
}

.report-highlight-card {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.report-highlight-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.report-highlight-card p {
    margin: 0;
    color: var(--quiet);
    font-size: 0.88rem;
    line-height: 1.45;
}

.copy { max-width: 590px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0 0 18px;
    padding: 6px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--badge-bg);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

h1 {
    margin: 0;
    max-width: 620px;
    font-size: clamp(3rem, 6.2vw, 4.65rem);
    line-height: 1;
    letter-spacing: 0;
}

.lead {
    margin: 22px 0 0;
    max-width: 540px;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.7;
    font-weight: 600;
}

.hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 190px) minmax(0, 150px);
    gap: 10px;
    margin-top: 26px;
}

.pill {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-glass);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}


body.is-app .landing-home,
body.is-app .landing-showcase,
body.is-app .hero-intro {
    display: none;
}

body.is-auth .landing-home {
    display: none;
}

body.is-app .hero {
    padding: 0;
}

.app-dashboard {
    display: grid;
    gap: 14px;
}

.app-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px;
    background: var(--surface-elevated);
    box-shadow: var(--card-shadow);
}

.dashboard-overview {
    display: grid;
    gap: 16px;
}

.dashboard-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.hello-line {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 600;
}

.dashboard-title h1 {
    margin: 0;
    max-width: none;
    font-size: clamp(2rem, 7vw, 3.1rem);
    line-height: 1;
    font-weight: 600;
}

.dashboard-title p:last-child {
    margin: 8px 0 0;
    max-width: 440px;
    color: var(--muted);
    line-height: 1.45;
}

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

.people-line {
    align-items: center;
    flex-wrap: wrap;
}

.people-line .member-chips {
    margin-left: auto;
}

.section-head {
    display: grid;
    gap: 12px;
    max-width: 720px;
}

.section-head .eyebrow {
    margin: 0;
    justify-self: start;
}

.section-head h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(2rem, 4.4vw, 3.35rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.section-head p,
.feature-card p,
.price-card p,
.faq-grid p {
    margin: 0;
    max-width: 58ch;
    color: var(--muted);
    line-height: 1.65;
    font-weight: 500;
}

.feature-grid,
.pricing-grid,
.faq-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.pricing-grid,
.faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.price-card,
.faq-grid article {
    min-height: 168px;
    display: grid;
    align-content: start;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    background: var(--surface-muted);
    box-shadow: var(--soft-shadow);
}

.feature-card h3,
.price-card h3,
.faq-grid h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1.22;
    font-weight: 600;
}



.price-card.is-highlight {
    background: var(--highlight-bg);
}

.panel {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    background: var(--surface-panel);
    box-shadow: var(--shadow);
}

body.is-app .panel {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

body.is-app .panel-head {
    display: none;
}

body.is-app .panel-head .logo {
    display: none;
}

.panel-kicker {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

body.is-app .panel-kicker {
    color: var(--quiet);
}

.panel-title {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1.2;
    font-weight: 600;
}

body.is-app .panel-title {
    font-size: clamp(2rem, 10vw, 3rem);
}

.panel-text {
    margin: 4px 0 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.92rem;
    font-weight: 600;
}

body.is-app .panel-text {
    max-width: 360px;
}

.auth-meta {
    margin: 4px 0 0;
    text-align: center;
}

.auth-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary-strong);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.auth-lead {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

.auth-invite-notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.5;
}

.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    border-radius: 15px;
    background: var(--soft);
    margin-bottom: 16px;
}

.tab {
    min-height: 42px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
    font: inherit;
    line-height: 1.2;
    text-align: center;
}

.tab:hover,
.tab:focus-visible {
    text-decoration: none;
    color: var(--text);
}

.tab.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 18px rgba(33, 45, 74, 0.08);
}

form, .setup-grid {
    display: grid;
    gap: 13px;
}

.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.setup-step .row-2 {
    grid-template-columns: minmax(0, 1.2fr) minmax(74px, 0.55fr) 58px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

input, select, textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
}

textarea {
    min-height: 116px;
    padding: 13px 14px;
    resize: vertical;
    line-height: 1.45;
}

input[type="color"] {
    height: 50px;
    padding: 6px;
    cursor: pointer;
}

input::placeholder,
textarea::placeholder {
    color: var(--quiet);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    transform: translateY(-50%);
    cursor: pointer;
}

.password-toggle:hover {
    background: var(--soft);
    color: var(--text);
}

.password-toggle-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.password-toggle-icon--hide {
    display: none;
}

.password-toggle.is-visible .password-toggle-icon--show {
    display: none;
}

.password-toggle.is-visible .password-toggle-icon--hide {
    display: block;
}

.primary, .secondary {
    min-height: 52px;
    border: 0;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
}

.primary {
    width: 100%;
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 12px 22px var(--primary-shadow);
    transform: scale(1);
    transition:
        background-color var(--motion-duration-fast) ease,
        transform 120ms var(--motion-pop),
        box-shadow 120ms ease;
}

.primary:active:not(:disabled):not(.is-busy) {
    transform: scale(0.96);
    box-shadow: 0 8px 16px var(--primary-shadow);
}

.secondary {
    background: var(--soft);
    color: var(--text);
}

.danger,
button.danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, var(--danger) 14%, var(--surface));
    color: var(--danger);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
    width: auto;
}

.danger:hover:not(:disabled) {
    background: color-mix(in srgb, var(--danger) 22%, var(--surface));
    border-color: color-mix(in srgb, var(--danger) 52%, var(--line));
}

.danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.secondary.is-danger-soft,
button.secondary.is-danger-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--danger) 34%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--danger) 10%, var(--soft));
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.secondary.is-danger-soft:hover:not(:disabled) {
    background: color-mix(in srgb, var(--danger) 18%, var(--soft));
    border-color: color-mix(in srgb, var(--danger) 48%, var(--line));
}

.modal-actions .secondary,
.modal-actions .primary,
.modal-actions .danger {
    min-height: 46px;
    padding: 0 14px;
    font-size: 0.92rem;
    border-radius: 14px;
}

.modal-actions .danger {
    width: 100%;
}

.checklist-item-modal-actions .danger {
    flex: 0 0 auto;
    min-width: 7.25rem;
}

button[data-remove-edit-item],
button[data-remove-edit-timer],
button[data-remove-setup-item],
.chat-meta button[data-delete-message],
.chat-line button[data-delete-message] {
    border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line));
    background: color-mix(in srgb, var(--danger) 10%, var(--surface));
    color: var(--danger);
    font-size: 1rem;
    line-height: 1;
}

button[data-remove-edit-item]:hover:not(:disabled),
button[data-remove-edit-timer]:hover:not(:disabled),
button[data-remove-setup-item]:hover:not(:disabled),
.chat-meta button[data-delete-message]:hover,
.chat-line button[data-delete-message]:hover {
    background: color-mix(in srgb, var(--danger) 20%, var(--surface));
    border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.primary:hover { background: var(--primary-strong); }
.primary:disabled { cursor: wait; opacity: 0.72; }

.message {
    display: none;
    margin-top: 14px;
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--soft);
    color: var(--muted);
    line-height: 1.45;
    font-weight: 600;
}

.message.is-visible { display: block; }

.message.is-message-enter {
    animation: dt-message-enter 240ms ease;
}

@keyframes dt-message-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.is-error {
    background: rgba(200, 63, 101, 0.1);
    color: var(--danger);
}

.view { display: none; }
.view.is-active { display: block; }

.account-box, .summary-box {
    border-radius: 16px;
    padding: 15px;
    background: var(--soft);
}

.summary-box {
    display: grid;
    gap: 10px;
}

.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-weight: 600;
}

.summary-line strong {
    color: var(--text);
}

.member-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.member-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
}

.member-chip small {
    display: inline-grid;
    min-width: 26px;
    min-height: 22px;
    place-items: center;
    border-radius: 999px;
    background: var(--soft);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.day-card {
    display: grid;
    gap: 0;
}

.day-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.date-controls {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    gap: 8px;
    align-items: center;
}

.icon-button,
.date-button {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

.date-button {
    width: 100%;
}

.day-title {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 600;
}

.day-date {
    margin: 3px 0 0;
    color: var(--muted);
    font-weight: 600;
}

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

.progress-row .progress-track {
    flex: 1 1 auto;
    min-width: 0;
}

.progress-row .progress-pill {
    flex: 0 0 auto;
}

.progress-pill {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
}

.progress-track {
    height: 10px;
    border-radius: 999px;
    background: var(--soft);
    overflow: hidden;
}

.progress-stack {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 0;
    min-width: 0;
    border-radius: inherit;
    overflow: hidden;
    transition: width 280ms cubic-bezier(0.33, 1, 0.68, 1);
}

.progress-stack-segment {
    flex: 0 0 auto;
    height: 100%;
    min-width: 0;
    background: var(--member-color, var(--primary));
}

.progress-stack-segment:only-child,
.progress-stack-segment.is-solo {
    border-radius: inherit;
}

.progress-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
}

.progress-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.progress-legend-dot {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--member-color, var(--primary));
}

.progress-legend-label {
    overflow: hidden;
    max-width: 12ch;
    color: var(--member-color);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-legend-item strong {
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
}

.week-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.week-day {
    position: relative;
    min-height: 58px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    display: grid;
    place-items: center;
    gap: 2px;
}

.week-day span {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}

.week-day strong {
    font-size: 0.8rem;
    color: var(--text);
}

.week-day.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.week-day.is-complete {
    background: linear-gradient(135deg, var(--success-bg), var(--highlight-bg));
    border-color: var(--success-border);
    color: var(--text);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent);
}

.week-day.is-complete::after {
    content: "\2713";
    position: absolute;
    bottom: 5px;
    right: 6px;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-strong);
    color: var(--on-primary);
    font-size: 0.66rem;
    font-weight: 600;
}

.week-day.is-complete strong,
.week-day.is-complete span {
    color: var(--text);
}

.week-day.is-day-select {
    animation: dt-week-day-select 300ms var(--motion-pop);
}

.week-day.is-today-pulse {
    animation: dt-week-today-pulse 420ms var(--motion-pop);
}

.week-day.is-complete-enter {
    animation: dt-week-complete-enter 380ms ease;
}

@keyframes dt-week-day-select {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.05); }
}

@keyframes dt-week-today-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 3px var(--primary-ring); }
    40% { transform: scale(1.07); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 34%, transparent); }
}

@keyframes dt-week-complete-enter {
    from {
        transform: scale(0.96);
        filter: brightness(0.98);
    }

    to {
        transform: scale(1);
        filter: none;
    }
}

.week-day.is-complete.is-complete-enter::after {
    animation: dt-week-check-pop 360ms var(--motion-pop);
}

@keyframes dt-week-check-pop {
    0% { transform: scale(0.4); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.chat-box {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: var(--surface);
}

.chat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.chat-head h2,
.chat-title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.1;
    font-weight: 600;
}

.chat-head span {
    min-width: 34px;
    min-height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--soft);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
}

.chat-list {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
}

.chat-message {
    border-left: 4px solid var(--author-color, var(--primary));
    border-radius: 14px;
    padding: 10px 11px;
    background: var(--soft);
}

.chat-message.is-own {
    background: #f4f0e8;
}

.chat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.78rem;
}

.chat-meta strong {
    color: var(--author-color, var(--text));
    font-weight: 600;
}

.chat-meta span {
    margin-right: auto;
}

.chat-meta button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 9px;
    background: var(--surface);
    color: var(--danger);
    cursor: pointer;
    font-weight: 600;
}

.chat-message p {
    margin: 0;
    color: var(--text);
    line-height: 1.45;
    white-space: pre-wrap;
}

.chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 8px;
    align-items: stretch;
}

.chat-form textarea {
    min-height: 48px;
    resize: none;
}

.chat-form .primary {
    min-height: 48px;
}

.checklist {
    display: grid;
    gap: 8px;
}

.checklist-head,
.check-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(var(--member-count, 2), 48px);
    gap: 8px;
    align-items: center;
}

.checklist-head {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 10px;
}

.member-head {
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.check-category {
    margin: 10px 6px 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.check-row {
    min-height: 48px;
    padding: 8px 10px 8px 13px;
    border-radius: 14px;
    background: var(--soft);
}

body.is-app .check-row {
    min-height: 54px;
}

.check-label {
    font-weight: 600;
    line-height: 1.2;
    transition:
        opacity 220ms ease,
        transform 220ms var(--motion-pop),
        color 220ms ease;
}

.checklist-scope {
    display: grid;
    grid-template-columns: repeat(var(--scope-count, 3), minmax(0, 1fr));
    gap: 6px;
    border-radius: 999px;
    padding: 5px;
    background: var(--soft);
}

.checklist-scope button {
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
    transition:
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 120ms var(--motion-pop);
}

.checklist-scope button:active {
    transform: scale(0.97);
}

.checklist-scope button.is-member-tab {
    color: var(--member-color, var(--muted));
}

.checklist-scope button.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 20px rgba(57, 68, 61, 0.08);
}

.checklist-scope button.is-member-tab.is-active {
    color: var(--member-color, var(--text));
}

.check-button {
    width: 38px;
    height: 38px;
    justify-self: center;
    position: relative;
    overflow: visible;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: transparent;
    cursor: pointer;
    font-weight: 600;
    transform: scale(1);
    transition:
        background-color var(--motion-duration-fast) ease,
        border-color var(--motion-duration-fast) ease,
        color var(--motion-duration-fast) ease,
        transform var(--motion-duration-fast) var(--motion-pop);
}

.check-button:active:not(:disabled) {
    transform: scale(0.94);
}

.check-spark {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    margin: -2.5px;
    border-radius: 50%;
    background: var(--spark-color, var(--primary));
    pointer-events: none;
    animation: dt-check-spark 420ms ease-out forwards;
}

@keyframes dt-check-spark {
    from {
        opacity: 1;
        transform: rotate(var(--spark-angle)) translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: rotate(var(--spark-angle)) translateY(-14px) scale(0.15);
    }
}

.check-button.is-check-pop {
    animation: dt-check-pop 220ms var(--motion-pop);
}

@keyframes dt-check-pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.check-row.is-row-done .check-label {
    opacity: 0.58;
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-color: color-mix(in srgb, var(--muted) 55%, transparent);
    text-decoration-thickness: 1px;
    transform: translateX(-2px);
}

.check-row.is-shopping-exiting {
    overflow: hidden;
    pointer-events: none;
    animation: dt-shopping-row-exit var(--motion-duration-exit) var(--motion-exit) forwards;
}

@keyframes dt-shopping-row-exit {
    0% {
        opacity: 1;
        max-height: 56px;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        max-height: 0;
        min-height: 0;
        margin-block: 0;
        padding-block: 0;
        transform: translateX(-10px);
    }
}

.progress-pill.is-progress-bump {
    animation: dt-progress-bump 320ms var(--motion-pop);
}

@keyframes dt-progress-bump {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.07); }
}

.checklist-items.is-content-enter {
    animation: dt-content-enter 120ms ease;
}

@keyframes dt-content-enter {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.check-row.is-shopping-enter {
    animation: dt-shopping-row-enter 260ms var(--motion-pop);
}

@keyframes dt-shopping-row-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.primary.is-quick-add-pop,
.shopping-list-quick-submit.is-quick-add-pop {
    animation: dt-quick-add-pop 320ms var(--motion-pop);
}

@keyframes dt-quick-add-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.08) rotate(0deg); }
    55% { transform: scale(0.98) rotate(90deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.chat-message.is-chat-enter {
    animation: dt-chat-enter 160ms ease;
}

@keyframes dt-chat-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.day-utility-panel:not([hidden]) {
    animation: dt-panel-enter 180ms ease;
}

@keyframes dt-panel-enter {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.setup-item.editable-item.is-editor-row-exit,
.shopping-list-editor-item.is-editor-row-exit {
    overflow: hidden;
    pointer-events: none;
    animation: dt-editor-row-exit 280ms var(--motion-exit) forwards;
}

@keyframes dt-editor-row-exit {
    from {
        opacity: 1;
        max-height: 72px;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        max-height: 0;
        min-height: 0;
        margin-block: 0;
        padding-block: 0;
        transform: translateX(-8px);
    }
}

.primary.is-save-success {
    animation: dt-save-success 520ms var(--motion-pop);
}

@keyframes dt-save-success {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 12px 22px var(--primary-shadow);
    }

    35% {
        transform: scale(1.04);
        box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 42%, transparent);
    }
}

.check-button-spacer {
    width: 38px;
    height: 38px;
    justify-self: center;
    border-radius: 12px;
    opacity: 0.35;
}

.check-button.is-checked {
    color: var(--on-primary);
    border-color: var(--member-color, var(--primary));
    background: var(--member-color, var(--primary));
}

.check-row.is-shared .check-button-shared {
    grid-column: 2 / -1;
    width: 100%;
    max-width: none;
    justify-self: stretch;
}

.check-button-shared.is-checked {
    color: var(--on-primary);
    border-color: color-mix(in srgb, var(--shared-color-a, var(--primary)) 58%, var(--shared-color-b, var(--primary)));
    background: linear-gradient(
        135deg,
        var(--shared-color-a, var(--primary)),
        var(--shared-color-b, var(--primary))
    );
}

.checklist-editor-toolbar {
    margin-bottom: 12px;
}

#checklistModal .checklist-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

#checklistModal .checklist-editor-toolbar .secondary {
    width: auto;
    flex: 1 1 calc(50% - 4px);
    min-width: min(100%, 148px);
}

#checklistModal .checklist-board-tabs {
    flex-shrink: 0;
    margin: 4px 0 14px;
    padding: 0 2px;
}

#checklistModal .modal-card,
#timersModal .modal-card,
#shoppingListViewModal .modal-card,
#spaceModal .modal-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#checklistModal .checklist-editor-toolbar,
#checklistModal .checklist-modal-actions,
#timersModal .checklist-editor-toolbar,
#timersModal .checklist-modal-actions {
    flex-shrink: 0;
}

#checklistModal .setup-items,
#timersModal .setup-items {
    flex: 1;
    min-height: 0;
    overflow: auto;
    margin-right: -4px;
    padding-right: 4px;
}

#checklistModal .checklist-modal-actions,
#timersModal .checklist-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 12px;
    padding-top: 12px;
    background:
        linear-gradient(to top, var(--surface) 78%, color-mix(in srgb, var(--surface) 72%, transparent));
    border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.profile-modal-card {
    width: min(100%, 620px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    margin-right: -4px;
    padding-right: 4px;
}

.profile-modal-section + .profile-modal-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.profile-modal-section-title {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-modal-body .profile-color-field {
    gap: 8px;
}

.profile-modal-body .profile-color-field > label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.profile-password-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
}

.profile-password-actions .secondary {
    width: 100%;
    min-height: 42px;
}

.profile-password-section .field-row {
    grid-template-columns: 1fr;
    gap: 7px;
    align-items: start;
    min-height: auto;
    margin-top: 4px;
}

.profile-password-section .field-row > label {
    min-height: auto;
    font-size: 0.74rem;
    letter-spacing: 0.05em;
}

.profile-password-section .field-row > input {
    min-height: 40px;
    height: 40px;
    font-size: 0.9rem;
}

.profile-password-section .password-rules {
    margin-top: 6px;
    gap: 8px;
}

.profile-password-section .password-rules span {
    min-height: 30px;
    padding: 0 11px;
    font-size: 0.78rem;
}

.account-modal-password {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
}

.account-modal-section-title {
    margin: 0 0 10px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--text) 72%, transparent);
}

.account-modal-body input[readonly] {
    opacity: 0.88;
    cursor: default;
    background: color-mix(in srgb, var(--surface-2, var(--surface)) 88%, var(--line));
}

.profile-modal-actions {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 12px;
    padding-top: 12px;
    background:
        linear-gradient(to top, var(--surface) 78%, color-mix(in srgb, var(--surface) 72%, transparent));
    border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.modal.modal--setting {
    z-index: 220;
}

.modal.modal--setting.is-stacked {
    z-index: 230;
}

.modal.modal--sheet {
    z-index: 220;
    padding: 0;
    place-items: stretch;
    background: var(--surface);
}

.modal.modal--sheet.is-stacked {
    z-index: 230;
}

.modal.modal--sheet.is-open {
    display: flex;
    flex-direction: column;
}

.modal.modal--sheet > .modal-card,
.modal.modal--sheet .setting-modal-card {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal.modal--sheet .modal-head {
    flex-shrink: 0;
    padding:
        max(16px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        14px
        max(16px, env(safe-area-inset-left));
}

.modal.modal--sheet .modal-form,
.modal.modal--sheet .setting-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding:
        0
        max(16px, env(safe-area-inset-right))
        16px
        max(16px, env(safe-area-inset-left));
}

.modal.modal--sheet .setting-modal-body {
    padding-top: 12px;
}

.modal.modal--sheet .modal-actions,
.modal.modal--sheet .setting-modal-actions {
    flex-shrink: 0;
    margin-top: 0;
    padding:
        10px
        max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
}

.modal.modal--sheet.is-open:not(.is-closing) .modal-card,
.modal.modal--sheet.is-open:not(.is-closing) .setting-modal-card,
.modal.modal--sheet.is-closing .modal-card,
.modal.modal--sheet.is-closing .setting-modal-card {
    animation: none;
}

.modal.modal--sheet .checklist-editor-toolbar,
.modal.modal--sheet .checklist-board-tabs {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
}

.modal.modal--sheet .setup-items {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
}

.modal.modal--sheet .shopping-list-visibility,
.modal.modal--sheet .shopping-list-view-quick-add {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
}

.modal.modal--sheet .shopping-list-visibility {
    flex-shrink: 0;
    margin-bottom: 12px;
}

.modal.modal--sheet .shopping-list-view-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
}

#shoppingListViewModal .shopping-panel-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

#chatModal .modal-card--chat {
    display: flex;
    flex-direction: column;
    max-height: min(calc(100dvh - 36px), 680px);
    overflow: hidden;
}

#chatModal .chat-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
    border: 0;
    padding: 0;
    background: transparent;
}

#chatModal .chat-list {
    flex: 1;
    min-height: 0;
    max-height: min(46vh, 320px);
    overflow: auto;
}

.modal-card--chat {
    width: min(100%, 480px);
}

@media (max-width: 400px) {
    .shopping-list-modal-quick-add,
    .shopping-list-view-quick-add,
    .shopping-list-quick-add.shopping-panel-quick-add {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }

    .shopping-list-modal-quick-add .shopping-list-quick-submit,
    .shopping-list-view-quick-add .shopping-list-quick-submit,
    .shopping-list-quick-add.shopping-panel-quick-add .shopping-list-quick-submit {
        grid-column: 1;
        grid-row: 3;
        min-height: 42px;
        width: 100%;
    }

    .shopping-list-editor-item {
        grid-template-columns: minmax(0, 1fr) 36px;
    }

    .shopping-list-editor-item select {
        grid-column: 1 / -1;
    }
}

@media (min-width: 761px) {
    body.is-app .menu-overlay {
        justify-content: flex-end;
        background: var(--overlay);
    }

    body.is-app .menu-sheet {
        width: min(420px, 92vw);
        max-width: 420px;
        margin-left: auto;
        border-left: 1px solid var(--line);
        box-shadow: -18px 0 48px color-mix(in srgb, var(--shadow) 42%, transparent);
        animation: dt-menu-sheet-in 240ms var(--motion-pop);
    }

    .menu-theme-switch,
    .menu-inline-block--color .menu-color-palette {
        max-width: 320px;
    }

    .modal.modal--sheet {
        padding:
            max(18px, env(safe-area-inset-top))
            max(18px, env(safe-area-inset-right))
            max(18px, env(safe-area-inset-bottom))
            max(18px, env(safe-area-inset-left));
        place-items: center;
        background: var(--overlay);
    }

    .modal.modal--sheet.is-open {
        display: grid;
    }

    .modal.modal--sheet > .modal-card,
    .modal.modal--sheet .setting-modal-card {
        width: min(100%, 520px);
        height: auto;
        max-height: min(calc(100dvh - 36px), 760px);
        flex: none;
        border-radius: 22px;
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        overflow: auto;
    }

    .modal.modal--sheet.modal--sheet-editor > .modal-card {
        width: min(100%, 640px);
        max-height: min(calc(100dvh - 36px), 820px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0;
    }

    .modal.modal--sheet.modal--sheet-editor .modal-card--chat {
        width: min(100%, 480px);
        padding: 0;
    }

    .modal.modal--sheet.is-open:not(.is-closing) .modal-card,
    .modal.modal--sheet.is-open:not(.is-closing) .setting-modal-card,
    .modal.modal--sheet.is-closing .modal-card,
    .modal.modal--sheet.is-closing .setting-modal-card {
        animation: dt-modal-card-in 220ms var(--motion-pop);
    }

    #shoppingListViewModal .shopping-panel-list {
        max-height: min(52vh, 420px);
    }
}

@keyframes dt-menu-sheet-in {
    from {
        opacity: 0;
        transform: translateX(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.is-app .menu-sheet {
        animation: none;
    }
}

.setting-modal-card {
    display: flex;
    flex-direction: column;
}

.setting-modal-body {
    overflow: visible;
}

.modal.modal--sheet .setting-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.setting-modal-actions {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.setting-modal-actions .primary,
.setting-modal-actions .secondary {
    flex: 1;
}

.setting-modal-actions--password {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.setting-modal-actions--password .secondary {
    width: 100%;
    min-height: 42px;
}

.checklist-item-form .field-row:has(.member-choice-grid),
.checklist-item-form .field-row:has(.weekday-grid),
.checklist-item-form .field-row:has(.completion-mode-field) {
    align-items: start;
}

.checklist-item-form .field-row .completion-mode-field {
    margin-top: 0;
}

#checklistItemModal .modal-card,
#timerItemModal .modal-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

#checklistItemModal .checklist-item-form,
#timerItemModal .timer-item-form {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#checklistItemModal .field-row,
#timerItemModal .field-row,
#checklistItemModal .member-choice-grid,
#checklistItemModal .weekday-grid,
#checklistItemModal .completion-mode-field,
#timerItemModal .timer-emoji-picker-wrap {
    min-width: 0;
    max-width: 100%;
}

.checklist-item-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    min-width: 0;
    flex-shrink: 0;
}

.checklist-item-modal-actions .danger:not([hidden]) {
    grid-column: 1 / -1;
}

.checklist-item-modal-actions-main {
    display: contents;
}

.checklist-item-modal-actions .secondary,
.checklist-item-modal-actions .primary,
.checklist-item-modal-actions .danger {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 46px;
    padding: 0 12px;
}

.timer-item-form .timer-emoji-field {
    align-items: start;
}

.timer-emoji-picker-wrap {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.timer-emoji-preview {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--soft) 72%, var(--surface));
    font-size: 1.35rem;
    line-height: 1;
}

.timer-emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timer-emoji-option {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.timer-emoji-option:hover {
    border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
}

.timer-emoji-option.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.timer-emoji-option-default {
    font-size: 1.05rem;
}

.timer-emoji-custom {
    width: 100%;
    min-height: var(--field-height, 38px);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    background: var(--surface);
    color: var(--text);
    font-size: var(--field-font-size, 0.9rem);
}

.space-mode-remove-list {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    color: var(--text-secondary, #5c5a56);
}

.space-mode-remove-list li {
    margin: 0.35rem 0;
}

.space-member-permissions-section {
    margin-top: 2px;
}

.space-member-permissions-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.space-member-permissions {
    display: grid;
    gap: 10px;
    width: 100%;
}

.space-member-permission-row {
    display: grid;
    gap: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--soft) 70%, var(--surface));
    overflow: hidden;
}

.space-member-permission-row.is-locked {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.space-member-permission-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    min-width: 0;
}

.space-member-permission-badge {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--member-color) 18%, var(--surface));
    color: var(--member-color);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.space-member-permission-copy {
    min-width: 0;
    flex: 1;
}

.space-member-permission-copy strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.25;
    font-weight: 600;
}

.space-member-permission-note {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.space-member-permission-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 11px 14px;
    border-top: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    user-select: none;
}

.space-member-permission-row.is-locked .space-member-permission-toggle {
    cursor: default;
    color: var(--muted);
}

.space-member-permission-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--primary);
}

.space-member-permission-toggle span {
    text-transform: none;
    letter-spacing: normal;
}

#spaceModal .modal-form.app-modal-form {
    display: grid;
    gap: 14px;
}

.app-version-badge[hidden] {
    display: none !important;
}

.app-version-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 18%, var(--surface));
    color: var(--primary);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    vertical-align: middle;
}

.checklist-board-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0 2px;
}

.checklist-board-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.checklist-board-scope button,
.checklist-board-tabs button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    transition:
        background-color 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        transform 120ms var(--motion-pop);
}

.checklist-board-scope button:active,
.checklist-board-tabs button:active {
    transform: scale(0.97);
}

.checklist-board-scope button.is-active,
.checklist-board-tabs button.is-active {
    border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    color: var(--text);
}

.shopping-list-visibility {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 0.92rem;
    font-weight: 600;
}

.shopping-list-visibility input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.shopping-list-quick-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 8px;
    align-items: stretch;
    margin: 0 0 16px;
}

.shopping-list-quick-row {
    grid-column: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.shopping-list-quick-row:first-of-type {
    grid-row: 1;
}

.shopping-list-quick-row:nth-of-type(2) {
    grid-row: 2;
}

.shopping-list-quick-label,
.shopping-list-quick-place-label,
.shopping-list-editor-item-place-label {
    flex-shrink: 0;
    min-width: 3.5rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.shopping-list-quick-input {
    min-width: 0;
    width: 100%;
    min-height: 44px;
}

.shopping-list-quick-place-field,
.shopping-list-editor-item-place-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.shopping-list-quick-add select,
.shopping-list-editor-item select {
    width: 100%;
    min-height: 44px;
}

.shopping-list-quick-row select {
    min-width: 0;
}

.shopping-list-quick-submit {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    justify-self: stretch;
    min-width: 52px;
    width: auto;
    min-height: 0;
    height: auto;
    padding-inline: 14px;
    font-size: 1.35rem;
    line-height: 1;
}

#shoppingListViewModal .modal-head,
#shoppingListViewModal .shopping-list-visibility,
#shoppingListViewModal .modal-actions {
    flex-shrink: 0;
}

#shoppingListViewModal .shopping-panel-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow: auto;
    margin-right: -4px;
    padding-right: 4px;
}

.shopping-list-modal-quick-add {
    margin: 0 0 12px;
}

.shopping-list-modal-quick-add .shopping-list-quick-input,
.shopping-list-modal-quick-add select,
.shopping-list-modal-quick-add .shopping-list-quick-submit {
    min-height: 42px;
}

.shopping-list-modal-quick-add .shopping-list-quick-submit {
    min-width: 48px;
    padding-inline: 12px;
}

.shopping-list-editor-item {
    grid-template-columns: minmax(96px, 31%) minmax(0, 1fr) 36px;
    gap: 8px;
    padding: 5px 8px 5px 10px;
    min-height: 42px;
}

.shopping-list-editor-item select {
    min-height: 34px;
    height: 34px;
    padding: 2px 24px 2px 8px;
    font-size: 0.78rem;
    font-weight: 600;
}

.shopping-list-editor-item-label {
    min-width: 0;
    line-height: 1.25;
}

.shopping-list-editor-item .danger {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
}

.shopping-list-quick-add.is-inline {
    margin: 14px 0 0;
    position: sticky;
    bottom: 0;
    padding-top: 10px;
    background: linear-gradient(to top, var(--surface) 82%, transparent);
}

.check-category.is-shopping-place {
    margin-top: 12px;
}

.check-category.is-shopping-place:first-child {
    margin-top: 4px;
}

.checklist-head.is-shopping-head {
    grid-template-columns: 1fr auto;
}

.check-row.is-shopping-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.check-button.is-shopping-check {
    --member-color: var(--primary);
}

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

.day-utility-bar.is-shopping-hidden,
.day-utility-bar:has(#shoppingUtilityToggle[hidden]),
.day-utility-bar:has(#shoppingUtilityToggle.is-utility-hidden) {
    grid-template-columns: 1fr;
}

#shoppingUtilityToggle[hidden],
#shoppingUtilityToggle.is-utility-hidden {
    display: none !important;
}

.day-utility-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 82%, var(--soft));
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.day-utility-toggle.is-open {
    border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}

.day-utility-toggle.has-unread {
    border-color: color-mix(in srgb, var(--rose) 40%, var(--line));
}

.day-utility-toggle-label {
    font-size: 0.88rem;
    font-weight: 600;
}

.day-utility-toggle-count {
    min-width: 28px;
    min-height: 28px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--soft) 80%, var(--surface));
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.day-utility-toggle.has-unread .day-utility-toggle-count {
    color: var(--text);
}

.day-utility-toggle-unread {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--rose);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 18%, transparent);
}

.day-utility-toggle-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 160ms ease;
}

.day-utility-toggle.is-open .day-utility-toggle-chevron {
    transform: rotate(-135deg) translateY(2px);
}

.day-utility-panel {
    display: grid;
    gap: 10px;
}

.day-utility-panel[hidden] {
    display: none !important;
}

.shopping-panel-content {
    display: grid;
    gap: 10px;
}

.shopping-panel-list {
    display: grid;
    gap: 7px;
    max-height: min(36vh, 280px);
    overflow: auto;
}

.shopping-panel-quick-add {
    margin: 0;
}

body.is-app .checklist-shell {
    display: block;
    min-height: 0;
}

body.is-app .checklist-shell .checklist {
    overflow: visible;
    overscroll-behavior: auto;
    touch-action: pan-y;
}

@media (prefers-reduced-motion: reduce) {
    .check-button.is-check-pop,
    .check-row.is-shopping-exiting,
    .check-row.is-shopping-enter,
    .checklist-items.is-content-enter,
    .chat-message.is-chat-enter,
    .day-utility-panel:not([hidden]),
    .primary.is-quick-add-pop,
    .primary.is-save-success,
    .progress-pill.is-progress-bump,
    .progress-head-count.is-progress-bump,
    .day-utility-panel.is-panel-enter,
    .message.is-message-enter,
    .modal.is-open:not(.is-closing) .modal-card,
    .modal.is-closing .modal-card,
    .week-day.is-day-select,
    .week-day.is-today-pulse,
    .week-day.is-complete-enter,
    .week-day.is-complete.is-complete-enter::after,
    .setup-item.editable-item.is-editor-row-exit,
    .shopping-list-editor-item.is-editor-row-exit,
    .check-spark {
        animation: none !important;
    }

    .check-row.is-shopping-exiting,
    .setup-item.editable-item.is-editor-row-exit,
    .shopping-list-editor-item.is-editor-row-exit {
        opacity: 0;
    }

    .check-button,
    .check-row.is-row-done .check-label,
    .progress-stack,
    .primary,
    .checklist-scope button,
    .checklist-board-scope button,
    .checklist-board-tabs button {
        transition: none !important;
    }

    .check-button:active:not(:disabled),
    .primary:active:not(:disabled):not(.is-busy),
    .checklist-scope button:active,
    .checklist-board-scope button:active,
    .checklist-board-tabs button:active {
        transform: none;
    }
}

body.is-app #chatModal .chat-list {
    max-height: min(46vh, 360px);
}

#checklistBoardsModal .modal-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#checklistBoardsModal .checklist-boards-editor {
    flex: 1;
    min-height: 0;
}

#checklistBoardsModal .checklist-boards-toolbar,
#checklistBoardsModal .modal-actions {
    flex-shrink: 0;
}

.checklist-boards-editor {
    display: grid;
    gap: 14px;
    max-height: min(52vh, 420px);
    overflow: auto;
    padding: 2px 6px 2px 2px;
}

.checklist-board-editor-row {
    display: grid;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--soft) 65%, var(--surface));
}

.checklist-board-editor-row .field-stack > label {
    margin-bottom: 2px;
}

.checklist-board-member-grid {
    gap: 8px;
}

.checklist-board-editor-row .is-danger-soft {
    justify-self: start;
    margin-top: 2px;
}

.checklist-boards-toolbar {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.checklist-board-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px dashed color-mix(in srgb, var(--line) 88%, var(--text));
    border-radius: 999px;
    background: transparent;
    color: color-mix(in srgb, var(--text) 78%, var(--muted));
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.checklist-board-add:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.checklist-board-add:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.checklist-board-add-icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--soft) 70%, var(--surface));
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 700;
}

.checklist-board-add-label {
    letter-spacing: 0.01em;
}

@media (max-width: 420px) {
    .checklist-board-add-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .checklist-board-add {
        width: 42px;
        padding: 0;
    }
}

.editable-timer-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.editable-timer-emoji {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--soft) 72%, var(--surface));
    font-size: 1rem;
    line-height: 1;
}

.completion-mode-field {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.completion-mode-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.completion-mode-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border-radius: 999px;
    padding: 4px;
    background: var(--soft);
}

.completion-mode-toggle button {
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
}

.completion-mode-toggle button.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 18px rgba(57, 68, 61, 0.08);
}

.completion-mode-toggle button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.completion-mode-field.is-hidden {
    display: none;
}

.modal-add-row .completion-mode-field {
    grid-column: 1 / -1;
}

.empty-state {
    border-radius: 16px;
    padding: 16px;
    background: var(--soft);
    color: var(--muted);
    font-weight: 600;
    line-height: 1.45;
}


@media (max-width: 860px) {
    body:not(.is-landing):not(.is-home):not(.is-auth) .shell {
        padding: 20px 16px;
        gap: 24px;
    }

    .hero {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 24px;
    }

    .copy {
        max-width: none;
    }

    .panel {
        max-width: 560px;
    }

    .site-nav {
        display: none;
    }

    .feature-grid,
    .pricing-grid,
    .faq-grid,
}

@media (max-width: 520px) {
    body:not(.is-landing):not(.is-home):not(.is-auth) .shell {
        padding: 16px;
    }
    .brand-claim { display: none; }
    .hero { gap: 18px; }
    .eyebrow {
        padding: 5px 13px;
        margin-bottom: 14px;
        font-size: 0.68rem;
    }
    h1 {
        font-size: clamp(2.35rem, 10.8vw, 3rem);
        line-height: 1.02;
    }
    .lead {
        margin-top: 15px;
        font-size: 0.98rem;
    }
    .hero-actions { grid-template-columns: 1fr; }
    .panel { padding: 14px; border-radius: 18px; }
    .row-2 { grid-template-columns: 1fr; gap: 13px; }
    .member-edit-row { grid-template-columns: 1fr; }
}

/* Product-site polish */
body {
    font-weight: 300;
}

body,
button,
input,
textarea,
select {
    font-weight: 400;
}

.brand-title,
h1,
.panel-title,
.modal-title,
.section-head h2,
.dashboard-title h1 {
    font-weight: 600;
}

.brand-claim,
.site-nav a,
.lead,
.panel-text,
.modal-text,
.summary-line,
.member-chip,
.check-label,
.chat-message p,
.usecase-list li,
.feature-card p,
.price-card p,
.faq-grid p {
    font-weight: 300;
}

.eyebrow,
.pill,
.panel-kicker,
label,
.checklist-head,
.calendar-weekdays,
.menu-item,
.primary,
.secondary,
.tab,
.week-day,
.day-title,
.progress-pill,
.hello-line {
    font-weight: 400;
}

.summary-line strong,
.chat-meta strong,
.week-day strong,
.stat strong {
    font-weight: 600;
}

body:not(.is-landing):not(.is-home):not(.is-auth) .shell {
    width: min(100%, 1180px);
    min-height: auto;
    padding: 0 24px 72px;
}

body.is-app .shell {
    min-height: 100vh;
    padding-top: 18px;
}

body.is-app .topbar {
    position: static;
    margin-top: 0;
}

.brand-title {
    font-weight: 600;
}

.brand-claim {
    font-weight: 400;
}

.site-nav a {
    font-weight: 600;
}

.site-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 1.18rem;
    font-weight: 600;
}

.hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.72fr);
    min-height: calc(100vh - 144px);
    padding: clamp(42px, 7vw, 86px) 0 36px;
}

body.is-auth .hero {
    min-height: calc(100vh - 180px);
    padding-top: clamp(42px, 7vw, 86px);
}

.copy {
    max-width: 680px;
}

h1 {
    max-width: 680px;
    font-size: clamp(3.2rem, 6.4vw, 5.65rem);
    font-weight: 600;
    line-height: 0.98;
}

.lead {
    max-width: 590px;
    font-size: 1.12rem;
    font-weight: 300;
}

.eyebrow,
.pill,
.panel-kicker,
label,
.checklist-head,
.calendar-weekdays {
    font-weight: 600;
}

.primary,
.secondary,
.tab,
.menu-item,
.setup-item,
.summary-line,
.member-chip,
.day-title,
.progress-pill,
.week-day,
.check-label,
.feature-card h3,
.price-card h3,
.faq-grid h3 {
    font-weight: 600;
}

.panel-title,
.modal-title,
.section-head h2 {
    font-weight: 600;
}

input,
select,
textarea {
    font-weight: 400;
}

.landing-preview {
    display: block;
}

body.is-auth .landing-preview,
body.is-app .landing-preview {
    display: none;
}

.preview-card {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 238, 231, 0.86));
    box-shadow: var(--shadow);
}



.preview-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.preview-head span {
    display: block;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.preview-head strong {
    display: block;
    margin-top: 4px;
    font-size: 1.35rem;
    font-weight: 600;
}

.preview-pill {
    min-height: 38px;
    display: inline-flex !important;
    align-items: center;
    border-radius: 999px;
    padding: 0 13px;
    background: var(--cream);
    color: var(--text) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.preview-progress {
    height: 11px;
    margin: 22px 0;
    border-radius: 999px;
    overflow: hidden;
    background: var(--soft);
}

.preview-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.preview-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
    margin-bottom: 18px;
}

.preview-week span {
    min-height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--muted);
    background: var(--surface);
    font-size: 0.76rem;
    font-weight: 600;
}

.preview-week .is-done {
    background: var(--success-bg);
    color: var(--text);
}

.preview-week .is-today {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
    color: var(--text);
}

.preview-list {
    display: grid;
    gap: 10px;
}

.preview-list div {
    min-height: 54px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px 38px;
    gap: 10px;
    align-items: center;
    border-radius: 16px;
    padding: 8px 10px 8px 14px;
    background: var(--surface);
}

.preview-list span {
    font-weight: 600;
}

.preview-list b,
.preview-list i {
    width: 36px;
    height: 36px;
    display: block;
    border-radius: 12px;
    background: var(--primary);
}

.preview-list i {
    border: 2px solid var(--line);
    background: transparent;
}

.site-footer {
    color: rgba(255, 255, 255, 0.78);
    margin-top: auto;
    margin-bottom: 0;
    padding: 0;
}

body.is-app .site-footer {
    display: none;
}

.app-legal-footer {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 10px 0 4px;
    padding: 0 4px 10px;
    text-align: center;
}

.app-legal-footer__line {
    margin: 0;
    color: var(--quiet);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.5;
}

body.is-app .app-legal-footer {
    display: flex;
}

.app-legal-footer a {
    color: var(--quiet);
    font-size: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.app-legal-footer a:hover {
    color: var(--muted);
    text-decoration: underline;
}

.app-legal-sep {
    color: var(--quiet);
    font-size: 0.72rem;
    line-height: 1;
}

.footer-main {
    background: #26342d;
}

.footer-inner {
    width: min(100%, 1180px);
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px 28px;
    align-items: start;
    margin: 0 auto;
    padding: 40px 24px 36px;
}

.footer-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.footer-brand-link:hover .footer-brand-text strong {
    text-decoration: underline;
}

.footer-logo {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.footer-brand-text {
    display: grid;
    gap: 4px;
}

.footer-brand-text strong {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.footer-claim {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.88rem;
    line-height: 1.35;
    font-weight: 500;
}

.footer-col-title {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-links {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.footer-bar {
    background: #1a2420;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bar-inner {
    width: min(100%, 1180px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin: 0 auto;
    padding: 14px 24px;
}

.footer-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.86rem;
    line-height: 1.45;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 760px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px 24px 28px;
    }

    .footer-bar-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 24px 16px;
    }
}

@media (max-width: 520px) {
    .footer-legal {
        gap: 8px 14px;
    }
}

.legal-page {
    width: min(100%, 860px);
    margin: 0 auto;
    padding: 36px 24px 56px;
}

.legal-page h1 {
    font-size: clamp(1.85rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.12;
}

.legal-page .eyebrow {
    margin-bottom: 26px;
}

.legal-page p {
    color: var(--muted);
    line-height: 1.75;
}

.legal-page a {
    color: var(--primary);
    font-weight: 600;
}

.doc-page {
    width: min(100% - 32px, 980px);
    margin: 0 auto;
    padding: 48px 0 56px;
}

.doc-shell {
    grid-template-rows: auto 1fr;
    align-content: start;
    gap: 0;
}

.doc-hero {
    margin-bottom: 24px;
}

.doc-hero .eyebrow {
    margin-bottom: 26px;
}

.doc-hero h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(1.85rem, 4.5vw, 2.75rem);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: 0;
}

.doc-hero p {
    max-width: 640px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.12rem);
    line-height: 1.6;
}

.doc-hero a,
.doc-section a {
    color: var(--primary);
    font-weight: 600;
}

.doc-section {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(20px, 3.5vw, 28px);
    margin-top: 14px;
    background: rgba(255, 253, 250, 0.82);
    box-shadow: 0 14px 38px rgba(57, 68, 61, 0.08);
}

.doc-section h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    font-weight: 600;
}

.doc-section p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.doc-section ul {
    display: grid;
    gap: 9px;
    margin: 18px 0 0;
    padding-left: 20px;
    color: var(--text);
}

.doc-section li {
    line-height: 1.55;
}

.doc-layout {
    display: grid;
    grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.doc-toc {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-muted);
    box-shadow: var(--soft-shadow);
}

.doc-toc-title {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.doc-toc a {
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease;
}

.doc-toc a:hover,
.doc-toc a:focus-visible {
    background: var(--soft);
    color: var(--text);
}

.doc-content {
    display: grid;
    gap: 0;
    min-width: 0;
}

.doc-jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.doc-jump-nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 140ms ease, background 140ms ease;
}

.doc-jump-nav a:hover,
.doc-jump-nav a:focus-visible {
    border-color: var(--primary);
    background: var(--soft);
}

.doc-tip {
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: 14px;
    border-left: 3px solid var(--primary);
    background: var(--soft);
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.6;
}

.doc-tip strong {
    color: var(--primary);
}



.hero-meta {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
}

.hero-meta a {
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.hero-meta a:hover,
.hero-meta a:focus-visible {
    text-decoration: underline;
}

.landing-block {
    margin-top: clamp(28px, 4vw, 44px);
}

.landing-block:first-child {
    margin-top: clamp(32px, 5vw, 48px);
}

.landing-block + .landing-block {
    margin-top: clamp(20px, 3vw, 28px);
}

.section-head.landing-block + .feature-grid.landing-block,
.section-head.landing-block + .pricing-grid.landing-block,
.section-head.landing-block + .faq-grid.landing-block {
    margin-top: clamp(18px, 3vw, 28px);
}

.price-features {
    display: grid;
    gap: 8px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.price-features li {
    position: relative;
    padding-left: 22px;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.45;
    font-weight: 600;
}

.price-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: 700;
}

.faq-grid a {
    color: var(--primary);
    font-weight: 600;
}


.preview-list b.member-a {
    background: #e9a77d;
}

.preview-list b.member-b {
    background: #6fa99c;
}

.preview-list b.is-checked {
    position: relative;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
    opacity: 0.92;
}

.preview-list b.is-checked::after {
    content: "\2713";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}


.beta-access-band {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(22px, 4vw, 32px);
    background: var(--cream);
    box-shadow: var(--soft-shadow);
}

.beta-access-inner {
    display: grid;
    gap: 12px;
    justify-items: center;
    max-width: 460px;
    margin: 0 auto;
    text-align: center;
}

.beta-request-form {
    display: grid;
    gap: 12px;
    width: 100%;
    text-align: left;
}

.beta-request-form textarea {
    min-height: 88px;
    resize: vertical;
}

.beta-request-message {
    margin: 0;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.5;
}

.beta-request-message.is-success {
    color: var(--primary);
}

.beta-request-message.is-error {
    color: #b42318;
}

.beta-access-inner .eyebrow {
    margin-bottom: 26px;
}

.beta-access-inner h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.08;
}

.beta-access-inner p:not(.eyebrow) {
    margin: 0;
    max-width: 46ch;
    color: var(--muted);
    line-height: 1.65;
    font-weight: 500;
}

.beta-access-slot {
    width: min(100%, 420px);
    margin-top: 8px;
}

body.is-landing .section-head .eyebrow {
    display: inline-flex;
}

@media (max-width: 900px) {
    .doc-layout {
        grid-template-columns: 1fr;
    }

    .doc-toc {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .doc-toc-title {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .doc-page {
        padding: 32px 0 44px;
    }

    .doc-toc {
        display: none;
    }

    .doc-jump-nav {
        gap: 6px;
    }

    .doc-jump-nav a {
        font-size: 0.78rem;
        padding: 0 11px;
    }

}

@media (max-width: 860px) {
    body:not(.is-landing):not(.is-home):not(.is-auth) .shell {
        padding: 0 16px 48px;
    }

    .site-menu-button {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        z-index: 30;
        display: none;
        grid-template-columns: 1fr;
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 8px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .topbar.is-site-open .site-nav {
        display: grid;
    }

    .site-nav a {
        min-height: 44px;
        border-radius: 12px;
        padding: 0 12px;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-top: 32px;
    }

    .landing-preview {
        display: none;
    }
}

@media (max-width: 520px) {
    h1 {
        font-size: clamp(2.35rem, 10vw, 3.15rem);
        line-height: 1.02;
    }

    .lead {
        font-size: 1rem;
    }

    .brand-title {
        font-size: 1rem;
    }
}

body.is-app .hero {
    display: block;
    min-height: auto;
    padding: 0;
}

body.is-app .panel {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

body.is-app .panel-head {
    display: none;
}

body.is-app .topbar {
    margin-bottom: 8px;
}

/* Final readable weights and menus */
body,
button,
input,
textarea,
select {
    font-weight: 300;
}

h1,
h2,
h3,
.brand-title,
.panel-title,
.modal-title,
.dashboard-title h1,
.section-head h2 {
    font-weight: 600;
}

.primary,
.secondary,
.tab,
.menu-item,
.panel-kicker,
.eyebrow,
.pill,
label,
.checklist-head,
.member-head,
.day-title,
.progress-pill,
.summary-line strong,
.chat-meta strong {
    font-weight: 500;
}

.topbar {
    position: sticky;
}

.site-menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
}

.site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: min(100vw - 32px, 300px);
    display: none;
    grid-template-columns: 1fr;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.topbar.is-site-open .site-nav {
    display: grid;
}

.site-nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    padding: 0 12px;
}

.site-auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 6px;
}

.site-auth-actions .primary,
.site-auth-actions .secondary {
    min-height: 42px;
}



@media (max-width: 520px) {
    body.is-app .shell {
        padding: 8px;
    }

    .app-card {
        border-radius: 18px;
        padding: 12px;
    }

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

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

    .people-line {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .people-line .member-chips {
        grid-column: 1 / -1;
        margin-left: 0;
    }

    body:not(.is-app) .date-controls {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
    }

    body.is-app .topbar {
        padding: 10px 12px;
        border-radius: 18px;
    }

    .dashboard-title h1 {
        font-size: clamp(1.75rem, 9vw, 2.35rem);
    }

    .dashboard-title p:last-child {
        font-size: 0.95rem;
    }

    .week-strip {
        gap: 5px;
    }

    .week-day {
        min-height: 54px;
        border-radius: 12px;
    }

    .week-day.is-complete::after {
        content: "";
        display: none;
    }

    .week-day.is-complete {
        box-shadow: inset 0 -4px 0 rgba(79, 143, 69, 0.85);
    }

    .chat-form {
        grid-template-columns: minmax(0, 1fr) 50px;
    }

    .chat-form textarea {
        padding: 11px 12px;
        font-size: 0.95rem;
    }

    .chat-form .primary {
        padding: 0;
    }
}

/* Final navigation and typography pass */
body {
    font-weight: 300;
}

p,
li,
span,
a,
button,
input,
select,
textarea,
label,
.lead,
.panel-text,
.modal-text,
.summary-line,
.member-chip,
.check-label,
.chat-message p,
.feature-card p,
.price-card p,
.faq-grid p,
.usecase-list li {
    font-weight: 300;
}

h1,
h2,
h3,
.brand-title,
.panel-title,
.modal-title,
.dashboard-title h1,
.section-head h2 {
    font-weight: 600;
}

.primary,
.secondary,
.tab,
.menu-item,
.site-nav a,
.panel-kicker,
.eyebrow,
.pill,
.checklist-head,
.member-head,
.day-title,
.progress-pill,
.summary-line strong,
.chat-meta strong,
strong,
b {
    font-weight: 400;
}

.hero h1,
.copy h1,
.section-head h2 {
    font-weight: 600;
}

.topbar {
    position: sticky;
}

.site-menu-button {
    display: none;
}

.site-nav {
    position: static;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.site-nav a,
.site-auth-actions .primary,
.site-auth-actions .secondary {
    min-height: 40px;
    border-radius: 999px;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.site-nav a {
    padding: 0 12px;
}

.site-nav a:hover,
.site-auth-actions .primary:hover,
.site-auth-actions .secondary:hover {
    transform: translateY(-1px);
}

.site-auth-actions {
    display: flex;
    gap: 8px;
    padding: 0 0 0 8px;
}

.site-auth-actions .primary,
.site-auth-actions .secondary {
    width: auto;
    padding: 0 16px;
    box-shadow: none;
}











@media (max-width: 860px) {
    .site-menu-button {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: auto;
        right: 0;
        z-index: 30;
        width: min(100vw - 32px, 310px);
        display: none;
        grid-template-columns: 1fr;
        gap: 7px;
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 10px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .topbar.is-site-open .site-nav {
        display: grid;
    }

    .site-nav a {
        min-height: 44px;
        padding: 0 12px;
    }

    .site-auth-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px 0 0;
    }

    .site-auth-actions .primary,
    .site-auth-actions .secondary {
        width: 100%;
    }

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

    .landing-about-inner h2 {
        max-width: none;
    }

}

/* Landing hero: intro + showcase, gleiche Shell-Breite (1180px) */
body.is-landing .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: clamp(22px, 4vw, 36px);
    min-height: auto;
    padding: clamp(24px, 4vw, 40px) 0 clamp(28px, 4vw, 48px);
    width: 100%;
}

body.is-landing .hero .copy,
body.is-landing .hero-intro {
    display: grid;
    gap: 0;
    width: 100%;
    max-width: none;
}

body.is-landing .hero .lead {
    max-width: none;
}

body.is-landing .hero-intro h1,
body.is-landing .copy h1 {
    max-width: none;
}

body.is-landing .copy .hero-copy-block,
body.is-landing .hero-intro .hero-copy-block {
    max-width: none;
}

body.is-landing .copy .hero-actions,
body.is-landing .hero-intro .hero-actions {
    width: min(100%, 420px);
}

body.is-auth .landing-showcase,
body.is-auth .hero-intro {
    display: none;
}

body.is-landing .section-head {
    max-width: none;
}

body.is-landing .section-head .eyebrow {
    display: inline-flex;
}

body.is-landing .section-head h2 {
    max-width: 640px;
}

body.is-landing .section-head p {
    max-width: 58ch;
}

body.is-landing {
    overflow-x: clip;
}

/* Marketing: kein 100vh-Stretch im Main (sonst weißer Streifen über Footer) */
body.is-landing > main.shell,
body.is-home > main.shell {
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 0 !important;
}

.landing-home {
    padding-bottom: 0;
}

.landing-about-band {
    width: 100%;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(165deg, rgba(255, 253, 250, 0.98), rgba(232, 242, 237, 0.88));
    box-shadow: var(--soft-shadow);
}

.landing-about-inner {
    width: 100%;
    margin: 0;
}

.landing-about-inner .eyebrow {
    margin-bottom: 26px;
}

.landing-about-inner h2 {
    margin: 0 0 16px;
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    line-height: 1.08;
    font-weight: 600;
    max-width: none;
}

.landing-about-inner p {
    margin: 0 0 14px;
    max-width: none;
    color: var(--muted);
    line-height: 1.68;
    font-weight: 500;
    font-size: clamp(1rem, 2vw, 1.08rem);
}

.landing-about-inner p:last-child {
    margin-bottom: 0;
}

.landing-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2.5vw, 22px);
    align-items: stretch;
}

.landing-card {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 14px;
    height: 100%;
    padding: clamp(22px, 3.5vw, 30px);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-muted);
    box-shadow: var(--soft-shadow);
}

.landing-card .panel-kicker {
    margin: 0;
}

.landing-card h3 {
    margin: 0;
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    line-height: 1.2;
    font-weight: 600;
    color: var(--text);
}

.landing-card-copy {
    margin: 0;
    align-self: start;
    color: var(--muted);
    font-size: clamp(0.96rem, 1.8vw, 1.05rem);
    line-height: 1.55;
    font-weight: 500;
}

.landing-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 14px;
    text-decoration: none;
    text-align: center;
    font-size: 0.98rem;
    font-weight: 700;
    align-self: end;
    box-shadow: 0 12px 22px var(--primary-shadow);
}

.landing-card-button:hover {
    text-decoration: none;
}

.landing-cta-band {
    width: 100%;
    padding: clamp(36px, 6vw, 56px) clamp(24px, 5vw, 48px);
    border-radius: 24px;
    background:
        linear-gradient(
            155deg,
            color-mix(in srgb, var(--primary) 92%, #2d4a42),
            color-mix(in srgb, var(--primary) 78%, #1e332d)
        );
    border: 1px solid color-mix(in srgb, var(--primary) 35%, #1a2e28);
    box-shadow: 0 20px 44px color-mix(in srgb, var(--primary) 28%, transparent);
}

.landing-cta-inner {
    display: grid;
    gap: clamp(14px, 2.5vw, 20px);
    justify-items: center;
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: center;
}

.landing-cta-inner .version-launch-badge {
    border-color: color-mix(in srgb, var(--on-primary) 35%, transparent);
    background: color-mix(in srgb, var(--on-primary) 12%, transparent);
    color: var(--on-primary);
}

.landing-cta-inner h2 {
    margin: 0;
    max-width: 16ch;
    color: var(--on-primary);
    font-size: clamp(1.9rem, 5vw, 2.85rem);
    line-height: 1.06;
    font-weight: 600;
}

.landing-cta-inner p {
    margin: 0;
    max-width: 52ch;
    color: color-mix(in srgb, var(--on-primary) 90%, transparent);
    font-size: clamp(1rem, 2.2vw, 1.12rem);
    line-height: 1.6;
    font-weight: 500;
}

.landing-cta-button {
    min-height: 54px;
    min-width: min(100%, 320px);
    padding: 0 32px;
    margin-top: 4px;
    border: 0;
    background: var(--on-primary);
    color: var(--primary-strong);
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(18, 32, 28, 0.22);
}

.landing-cta-button:hover {
    background: #ffffff;
    color: var(--primary-strong);
}

.landing-beta-teaser .beta-access-inner {
    max-width: none;
    justify-items: start;
    margin: 0;
    text-align: left;
}

.landing-beta-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 8px;
    padding: 0 22px;
    border-radius: 14px;
    text-decoration: none;
}

.beta-access-inner--form {
    max-width: 420px;
    justify-items: stretch;
    text-align: left;
}

.beta-page-form {
    margin-top: 8px;
    padding: clamp(20px, 3vw, 28px);
}


.site-page-grid {
    margin-top: clamp(16px, 3vw, 24px);
}

.site-page-block {
    margin-top: clamp(20px, 3vw, 32px);
}

.site-page-note {
    margin-top: 20px;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.96rem;
}

.site-page-note a {
    color: var(--primary);
    font-weight: 600;
}

.feature-card h2,
.price-card h2,
.faq-grid article h2 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
}

.doc-page .feature-card,
.doc-page .price-card,
.doc-page .faq-grid article {
    min-height: auto;
}

@media (min-width: 601px) and (max-width: 960px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
}

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.small-modal {
    width: min(100%, 420px);
}

.back-to-top:hover {
    background: var(--soft);
    transform: translateY(6px);
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top.is-visible:hover {
    transform: translateY(-2px);
}

body.is-app .back-to-top {
    display: none;
}

.checklist .check-row:nth-child(odd) {
    background: color-mix(in srgb, var(--soft) 74%, var(--surface));
}

body.is-app .checklist .check-row:nth-child(odd) {
    background: color-mix(in srgb, var(--soft) 82%, var(--surface));
}


@media (max-width: 860px) {
    body.is-landing .hero {
        display: grid;
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 24px;
    }

    body.is-landing .copy {
        max-width: none;
    }

    body.is-landing .copy .hero-copy-block {
        max-width: none;
    }

    body.is-landing .copy .hero-actions {
        width: 100%;
    }

    body.is-landing .landing-showcase {
        order: 2;
    }

    .back-to-top {
        right: 14px;
        bottom: 14px;
    }
}

/* Final structural polish */
body,
p,
li,
span,
a,
button,
input,
select,
textarea,
label,
.lead,
.panel-text,
.modal-text,
.summary-line,
.member-chip,
.check-label,
.chat-message p,
.feature-card p,
.price-card p,
.faq-grid p,
.usecase-list li {
    font-weight: 400;
}

h1,
.hero h1,
.copy h1,
.dashboard-title h1 {
    font-weight: 800;
}

h2,
.section-head h2,
.panel-title,
.modal-title,
.chat-head h2 {
    font-weight: 600;
}

h3,
.brand-title,
.primary,
.secondary,
.tab,
.menu-item,
.site-nav a,
.panel-kicker,
.eyebrow,
.pill,
.checklist-head,
.member-head,
.day-title,
.progress-pill,
strong,
b {
    font-weight: 600;
}

body:not(.is-app):not(.is-landing):not(.is-home):not(.is-auth) .shell {
    padding-top: 0;
}

body:not(.is-app):not(.is-landing):not(.is-home) .hero {
    padding-top: clamp(28px, 4vw, 48px);
}

body.is-landing .hero,
body.is-home .hero {
    padding-top: clamp(12px, 2vw, 24px);
}

.chat-form textarea,
body.is-app .chat-form textarea {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    overflow: hidden;
    white-space: nowrap;
}

.chat-form textarea:focus,
body.is-app .chat-form textarea:focus {
    height: 88px;
    max-height: 128px;
    overflow: auto;
    white-space: normal;
}

@media (max-width: 860px) {
    body:not(.is-app) .hero {
        padding-top: 24px;
    }
}

/* App stable layout */
body.is-app {
    background:
        radial-gradient(circle at 12% 0%, var(--gradient-warm), transparent 30%),
        radial-gradient(circle at 88% 6%, var(--gradient-cool), transparent 32%),
        linear-gradient(145deg, var(--bg), color-mix(in srgb, var(--bg) 86%, var(--primary-soft)));
}

body.is-app::before {
    display: none;
}

html:has(body.is-app) {
    overflow-x: visible;
}

body.is-app {
    overflow-x: visible;
}

body.is-app .shell {
    display: flex;
    flex-direction: column;
    width: min(100%, 760px);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    padding:
        max(22px, calc(10px + env(safe-area-inset-top, 0px)))
        max(14px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
    gap: 8px;
}

body.is-offline.is-app .shell {
    padding-top: calc(max(22px, calc(10px + env(safe-area-inset-top, 0px))) + 38px);
}

body.is-app .topbar {
    display: none;
}

body.is-app .brand {
    display: none;
}

body.is-app .hero,
body.is-app .panel,
body.is-app #dashboardView,
body.is-app .app-dashboard,
body.is-app .day-card {
    width: 100%;
}

body.is-app .hero {
    display: block;
    flex: 1 0 auto;
    padding: 0;
}

body.is-app .panel {
    display: block;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

body.is-app #dashboardView.is-active {
    display: block;
}

body.is-app .menu-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    color: var(--text);
    box-shadow: 0 12px 30px rgba(71, 65, 54, 0.16);
    backdrop-filter: blur(14px);
}

body.is-app .app-menu.is-open .menu-button--gear {
    visibility: hidden;
    pointer-events: none;
}

body.is-app .menu-overlay {
    z-index: 200;
    background: var(--surface);
}

body.is-app .menu-sheet-head {
    border-bottom-color: var(--line);
}

body.is-app .menu-sheet-title {
    font-family: var(--font-display, inherit);
}

body.is-app .menu-sheet-close:hover,
body.is-app .menu-sheet-close:focus-visible {
    background: var(--soft);
}

body.is-app .dashboard-overview {
    border: 0;
    min-height: 118px;
    display: grid;
    gap: 0;
    align-content: end;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

body.is-app .dashboard-title {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

body.is-app .hello-line {
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
}

body.is-app .dashboard-title h1 {
    max-width: 100%;
    font-size: clamp(2.75rem, 7.4vw, 4.6rem);
    line-height: 0.94;
    word-break: break-word;
}

body.is-app .dashboard-meta {
    display: none;
}

body.is-app #dashboardSummary {
    display: none !important;
}

body.is-app .app-dashboard,
body.is-app .app-shell {
    display: block;
    width: 100%;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

body.is-app .app-header {
    position: relative;
    z-index: 40;
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 15px 0 10px;
    margin: 0 0 6px;
    overflow: visible;
}

body.is-app .app-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

body.is-app .app-header-top .app-menu {
    flex: 0 0 auto;
    margin-top: 2px;
    position: relative;
    z-index: 41;
}

body.is-app .app-header-copy {
    flex: 1;
    min-width: 0;
}

body.is-app .app-header-brand-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

body.is-app .app-header-brand {
    display: inline-block;
}

body.is-app .app-header-brand-row .app-version-badge {
    margin-left: 0;
    font-size: 0.58rem;
}

body.is-app .app-header-brand-row .app-space-mode-badge {
    background: color-mix(in srgb, var(--muted) 14%, var(--surface));
    color: var(--text);
}

body.is-app .app-header-team {
    margin: 4px 0 0;
    font-size: clamp(1.55rem, 6.4vw, 1.85rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.02em;
    word-break: break-word;
}

body.is-app .app-header-welcome {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

body.is-app .app-header-notice {
    margin: 0;
    padding: 9px 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
    border-radius: var(--editorial-radius-sm, 8px);
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
}

body.is-app .app-header-notice[hidden] {
    display: none !important;
}

body.is-app .app-main {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    width: 100%;
    overflow: visible;
    padding: 0 0 12px;
}

body.is-app .app-legal-footer {
    flex-shrink: 0;
    margin-top: 0;
    padding-bottom: 2px;
}

body.is-app .day-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    grid-template-columns: 1fr;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

body.is-app .date-controls--editorial {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

body.is-app .week-card {
    display: grid;
    gap: 11px;
    margin-bottom: 0;
}

body.is-app .week-card .panel-kicker {
    margin: 0;
    font-size: 0.74rem;
}

body.is-app .week-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

body.is-app .week-day {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 64px;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    isolation: isolate;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 5px;
    padding: 0;
    box-shadow: none;
    transition: transform 160ms ease;
}

body.is-app .week-day::before {
    display: none;
}

body.is-app .week-day strong,
body.is-app .week-day-number {
    width: auto;
    height: auto;
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-family: var(--font-display);
    font-size: clamp(0.98rem, 3.3vw, 1.28rem);
    line-height: 1.1;
    font-weight: 600;
    color: var(--text);
    box-shadow: none;
}

body.is-app .week-day span,
body.is-app .week-day-label {
    display: inline-block;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    font-size: 0.62rem;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--quiet);
}

body.is-app .week-day.has-activity:not(.is-complete) .week-day-label,
body.is-app .week-day.has-activity:not(.is-complete) > span {
    border-bottom-color: color-mix(in srgb, var(--primary) 45%, var(--line));
}

body.is-app .week-day.is-complete > span,
body.is-app .week-day.is-complete .week-day-label {
    border-bottom-color: var(--green);
}

body.is-app .week-day.is-complete::after {
    display: none;
}

body.is-app .progress-card {
    display: grid;
    gap: 8px;
    border-radius: var(--editorial-radius);
    padding: 12px 14px;
    background: var(--surface);
    box-shadow: none;
    backdrop-filter: none;
}

body.is-app .progress-row {
    gap: 10px;
}

body.is-app .day-title {
    font-size: 1.12rem;
    line-height: 1.16;
    font-weight: 600;
}

body.is-app .progress-pill,
body.is-app .chat-head span {
    min-width: 48px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--soft) 82%, var(--surface));
    font-size: 0.9rem;
    font-weight: 600;
}

body.is-app .progress-track {
    height: 10px;
    background: color-mix(in srgb, var(--soft) 78%, #000 5%);
}

body.is-app .progress-stack {
    transition: width 280ms cubic-bezier(0.33, 1, 0.68, 1);
}

body.is-app .progress-legend {
    gap: 6px 12px;
}

body.is-app .progress-legend-item {
    font-size: 0.7rem;
}

body.is-app .progress-legend-label {
    max-width: 10ch;
}

body.is-app .progress-legend-item strong {
    font-size: 0.76rem;
}

body.is-app .progress-message {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.color-palette {
    position: relative;
    width: 100%;
}

.color-current {
    width: 50px;
    height: 50px;
    min-height: 50px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.color-current span {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.72), transparent 24%),
        var(--choice-color);
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--surface) 84%, transparent);
}

.color-grid {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    z-index: 60;
    width: 228px;
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.color-palette.is-open .color-grid {
    display: grid;
}

.color-choice {
    width: 100%;
    aspect-ratio: 1;
    min-height: 42px;
    border: 2px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 999px;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.72), transparent 24%),
        var(--choice-color);
    cursor: pointer;
    box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--surface) 86%, transparent);
}

.color-choice.is-selected {
    border-color: var(--text);
    box-shadow:
        inset 0 0 0 3px color-mix(in srgb, var(--surface) 90%, transparent),
        0 0 0 3px color-mix(in srgb, var(--choice-color) 34%, transparent);
}

.color-palette--bars .color-current {
    width: 100%;
    height: var(--field-height, 36px);
    min-height: var(--field-height, 36px);
    padding: 3px 28px 3px 3px;
    position: relative;
}

.color-palette--bars .color-current::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
    opacity: 0.72;
}

.color-palette--bars .color-current span {
    width: 100%;
    height: 100%;
    border-radius: 9px;
}

.color-palette--bars .color-grid {
    left: 0;
    right: 0;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
}

.color-palette--bars .color-choice {
    aspect-ratio: auto;
    height: 30px;
    min-height: 30px;
    border-radius: 9px;
}

.chat-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.chat-line strong {
    color: var(--author-color, var(--text));
    font-weight: 600;
    white-space: nowrap;
}

.chat-line span {
    color: var(--muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.chat-line p {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.chat-line button {
    width: 28px;
    height: 28px;
    margin-left: auto;
    flex: 0 0 auto;
    border: 0;
    border-radius: 9px;
    background: var(--surface);
    color: var(--danger);
    cursor: pointer;
    font-weight: 600;
}

body.is-app .week-card,
body.is-app .progress-card,
body.is-app .chat-box,
body.is-app .checklist,
body.is-app .active-timers-card {
    border: 1px solid var(--line);
    border-radius: var(--editorial-radius);
    padding: 14px 16px;
    background: var(--surface);
    box-shadow: none;
    backdrop-filter: none;
}

body.is-app .active-timers-card {
    display: grid;
    gap: 10px;
}

body.is-app .active-timers-card[hidden] {
    display: none !important;
}

body.is-app .active-timers-list {
    display: grid;
    gap: 10px;
}

body.is-app .active-timer-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--soft) 72%, var(--surface));
}

body.is-app .active-timer-item.is-countdown {
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
    border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
}

body.is-app .active-timer-item.is-countup {
    background: color-mix(in srgb, var(--highlight-bg) 72%, var(--surface));
    border-color: color-mix(in srgb, var(--success-border) 42%, var(--line));
}

body.is-app .active-timer-item.is-reached {
    background: color-mix(in srgb, var(--success-bg) 78%, var(--surface));
    border-color: color-mix(in srgb, var(--success-border) 52%, var(--line));
}

body.is-app .active-timer-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 400;
    background: color-mix(in srgb, var(--surface) 88%, var(--soft));
    color: var(--primary-strong);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent);
}

body.is-app .active-timer-item.is-countup .active-timer-icon {
    color: color-mix(in srgb, var(--primary-strong) 82%, var(--success-border));
}

body.is-app .active-timer-item.is-reached .active-timer-icon {
    color: var(--primary-strong);
    background: color-mix(in srgb, var(--success-bg) 88%, var(--surface));
}

body.is-app .active-timer-copy {
    min-width: 0;
}

body.is-app .active-timer-label {
    display: block;
    font-size: 0.94rem;
    line-height: 1.25;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.is-app .active-timer-value {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    margin: 4px 0 0;
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.35;
    color: var(--muted);
}

body.is-app .active-timer-prefix {
    font-weight: 600;
    color: var(--muted);
}

body.is-app .active-timer-duration {
    font-weight: 600;
    color: var(--text);
}

body.is-app .chat-box {
    display: grid;
    gap: 10px;
}

body.is-app .chat-head {
    align-items: center;
}

body.is-app .chat-head h2 {
    font-size: 0.94rem;
    font-weight: 600;
}

body.is-app .chat-list {
    max-height: 168px;
}

body.is-app .chat-message {
    padding: 8px 10px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--soft) 76%, var(--surface));
}

body.is-app .chat-line {
    min-height: 28px;
}

body.is-app .empty-state {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 14px;
}

body.is-app .chat-form {
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 8px;
}

body.is-app .chat-form textarea,
body.is-app .chat-form .primary {
    min-height: 46px;
    height: 46px;
    border-radius: 16px;
}

body.is-app .chat-form textarea {
    overflow: hidden;
    white-space: nowrap;
    padding-top: 12px;
    padding-bottom: 12px;
}

body.is-app .chat-form textarea:focus {
    height: 84px;
    white-space: normal;
}

body.is-auth .shell {
    width: min(100%, 1180px);
    min-height: 0;
    margin-top: 0;
    padding:
        0
        max(24px, env(safe-area-inset-right))
        0
        max(24px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 34px;
}

body.is-auth .shell {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}

body.is-app .dashboard-overview,
body.is-app .date-controls--editorial,
body.is-app .week-card,
body.is-app .progress-card,
body.is-app .day-utility-bar,
body.is-app .day-utility-panel,
body.is-app .checklist-shell,
body.is-app .checklist,
body.is-app .active-timers-card {
    grid-column: 1 / -1;
}

body.is-app .checklist {
    display: grid;
    gap: 7px;
}

body.is-app .checklist-head,
body.is-app .check-row {
    grid-template-columns: minmax(0, 1fr) repeat(var(--member-count, 2), 42px);
    gap: 9px;
}

body.is-app .checklist-head {
    padding: 0 5px 2px;
    font-size: 0.72rem;
}

body.is-app .checklist-head span:first-child {
    color: var(--quiet);
}

body.is-app .check-row {
    min-height: 44px;
    padding: 5px 7px 5px 11px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--surface) 78%, var(--soft));
}

body.is-app .checklist .check-row:nth-child(odd) {
    background: color-mix(in srgb, var(--soft) 82%, var(--surface));
}

body.is-app .check-label {
    font-size: 0.86rem;
    font-weight: 600;
}

body.is-app .check-button {
    width: 34px;
    height: 34px;
    border-radius: 11px;
}

body.is-app .check-row.is-shared .check-button-shared {
    height: 34px;
}


@media (max-width: 620px) {
    body.is-app .dashboard-title h1 {
        font-size: clamp(2.35rem, 10.5vw, 3.65rem);
    }

    body.is-app .week-strip {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
    }

    body.is-app .week-day {
        width: 100%;
        min-width: 0;
        min-height: 56px;
        height: auto;
        aspect-ratio: auto;
        border-radius: 16px;
    }

    body.is-app .week-card,
    body.is-app .progress-card,
    body.is-app .chat-box,
    body.is-app .checklist,
    body.is-app .active-timers-card {
        padding: 12px;
    }

    body.is-app .checklist-head,
    body.is-app .check-row {
        grid-template-columns: minmax(0, 1fr) repeat(var(--member-count, 2), 38px);
        gap: 7px;
    }

    body.is-app .check-button {
        width: 32px;
        height: 32px;
    }

    .color-grid {
        right: auto;
        left: 0;
        width: 228px;
    }
}

@media (max-width: 560px) {
    body.is-app .shell {
        width: 100%;
        max-width: none;
        overflow: visible;
        padding:
            max(14px, env(safe-area-inset-top))
            max(12px, env(safe-area-inset-right))
            max(18px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
    }

    .setup-progress {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

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

    .modal-add-row {
        margin-top: 0;
        margin-bottom: 0;
    }

    .checklist-add-panel {
        margin-bottom: 12px;
    }

    .member-setup-card {
        padding: 10px;
    }

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

.is-hidden {
    display: none !important;
}

html[data-theme="dark"] {
    --bg: #171512;
    --surface: #211e1a;
    --surface-elevated: #26221d;
    --surface-muted: #2b2722;
    --surface-glass: #211e1a;
    --surface-panel: #26221d;
    --surface-faint: #302b25;
    --soft: #2b2722;
    --text: #efe9df;
    --muted: #b5aca0;
    --quiet: #8f877c;
    --line: #3a342c;
    --primary: #d4956a;
    --primary-strong: #c4785a;
    --primary-soft: color-mix(in srgb, var(--primary) 18%, var(--soft));
    --primary-ring: color-mix(in srgb, var(--primary) 28%, transparent);
    --primary-shadow: color-mix(in srgb, var(--primary) 30%, transparent);
    --green: #8eb5a6;
    --success-bg: color-mix(in srgb, var(--green) 16%, var(--surface));
    --success-border: color-mix(in srgb, var(--green) 34%, var(--line));
    --highlight-bg: color-mix(in srgb, var(--green) 10%, var(--surface));
    --rose: #d9956f;
    --cream: #211e1a;
    --badge-bg: color-mix(in srgb, var(--primary) 10%, var(--surface));
    --overlay: rgba(0, 0, 0, 0.58);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
    --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
    --soft-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
    --gradient-warm: transparent;
    --gradient-cool: transparent;
    --on-primary: #fff9f2;
    --theme-color-meta: #171512;
}

html[data-theme="dark"] body {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--soft) 55%, transparent), transparent 120px),
        var(--bg);
}

html[data-theme="dark"] body.is-app {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--soft) 70%, transparent), transparent 140px),
        var(--bg);
}

html[data-theme="dark"] .tab.is-active {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .landing-preview,
html[data-theme="dark"] .preview-card {
    background: var(--surface-elevated);
}

html[data-theme="dark"] .site-footer {
    border-top-color: var(--line);
}

html[data-theme="dark"] .footer-bar {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.invite-status-banner {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--soft);
    color: var(--text);
}

.invite-status-banner strong {
    font-size: 0.92rem;
}

.invite-status-banner span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.45;
}

.invite-status-banner.is-warning {
    border-color: rgba(198, 95, 125, 0.35);
    background: rgba(198, 95, 125, 0.08);
}

.invite-status-banner.is-warning strong {
    color: var(--danger);
}

.invite-status-banner.is-ready {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
    background: color-mix(in srgb, var(--primary) 8%, var(--soft));
}

.invite-option-panel {
    margin-bottom: 10px;
}

.invite-option-panel.is-blocked .invite-option-hint {
    color: var(--danger);
}

.invite-option-toggle {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px;
    text-align: left;
    font-weight: 600;
}

.invite-option-toggle::after {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.72;
    transition: transform 0.18s ease;
}

.invite-option-panel.is-expanded .invite-option-toggle::after {
    transform: rotate(-135deg);
}

.invite-option-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.invite-option-copy strong {
    font-size: 0.92rem;
}

.invite-option-hint {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.3;
}

.invite-option-body {
    margin-top: 10px;
}

.invite-blocked-preview {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px dashed color-mix(in srgb, var(--danger) 42%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--danger) 6%, var(--soft));
}

.invite-blocked-preview p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
}

.invite-qr-wrap {
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.invite-qr-code {
    width: min(100%, 196px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.invite-qr-code svg {
    width: 100%;
    height: auto;
    display: block;
}

.invite-qr-hint {
    margin: 0;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
}

.invite-share-actions {
    margin-top: 10px;
    grid-template-columns: 1fr 1fr;
}

.invite-share-actions #shareInviteLink:not([hidden]) {
    grid-column: 1;
}

.invite-share-actions #shareInviteLink:not([hidden]) ~ #copyInviteLink {
    grid-column: 2;
}

.invite-share-actions #shareInviteLink[hidden] ~ #copyInviteLink {
    grid-column: 1;
}

.invite-modal-close {
    margin-top: 4px;
    grid-template-columns: 1fr;
}

.invite-option-panel.is-blocked .modal-form input {
    opacity: 0.72;
}

.invite-share-actions .primary.is-busy,
.invite-share-actions .secondary.is-busy {
    opacity: 0.72;
}

.member-kick-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.member-kick-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.member-kick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.member-kick-row strong {
    display: block;
}

.member-kick-row span {
    color: var(--muted);
    font-size: 0.85rem;
}

.member-kick-row .danger {
    flex-shrink: 0;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.88rem;
}

/* Mobile polish — app layout, safe areas, narrow screens */
@media (max-width: 640px) {
    body.is-app .shell {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
        padding:
            max(14px, env(safe-area-inset-top))
            max(12px, env(safe-area-inset-right))
            max(18px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
    }

    body.is-offline.is-app .shell {
        padding-top: calc(max(14px, env(safe-area-inset-top)) + 38px);
    }

    body.is-app .app-dashboard,
    body.is-app .day-card,
    body.is-app #dashboardView,
    body.is-app .app-main {
        min-width: 0;
    }

    body.is-app .dashboard-title h1 {
        font-size: clamp(2rem, 9.8vw, 3.4rem);
        line-height: 0.96;
    }

    body.is-app .hello-line {
        font-size: 0.76rem;
        line-height: 1.35;
    }

    body.is-app .date-button--editorial {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-height: 40px;
        padding-inline: 8px;
        font-size: 0.88rem;
    }

    body.is-app .date-nav-button {
        min-height: 36px;
        padding: 0;
    }

    body.is-app .week-card {
        padding: 12px;
    }

    body.is-app .week-strip {
        gap: clamp(3px, 1.1vw, 6px);
    }

    body.is-app .week-day {
        min-height: 52px;
    }

    body.is-app .week-day strong,
    body.is-app .week-day-number {
        width: auto;
        height: auto;
        font-size: clamp(0.88rem, 3vw, 1.06rem);
        border-radius: 0;
    }

    body.is-app .week-day span,
    body.is-app .week-day-label {
        font-size: 0.58rem;
    }

    body.is-app .progress-card,
    body.is-app .chat-box,
    body.is-app .checklist,
    body.is-app .active-timers-card {
        padding: 12px;
    }

    body.is-app .progress-row {
        gap: 8px;
    }

    body.is-app .progress-pill,
    body.is-app .chat-head span {
        min-width: 42px;
        padding-inline: 10px;
        font-size: 0.82rem;
    }

    body.is-app .checklist-head,
    body.is-app .check-row {
        grid-template-columns: minmax(0, 1fr) repeat(var(--member-count, 2), minmax(30px, 36px));
        gap: 6px;
    }

    body.is-app .check-label {
        font-size: 0.82rem;
        overflow-wrap: anywhere;
    }

    body.is-app .check-button {
        width: 32px;
        height: 32px;
    }

    body.is-app .chat-form {
        grid-template-columns: minmax(0, 1fr) 52px;
        gap: 8px;
    }

    body.is-app .chat-form .primary {
        min-height: 46px;
        padding: 0;
    }

    .modal {
        padding:
            max(12px, env(safe-area-inset-top))
            max(12px, env(safe-area-inset-right))
            max(12px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
    }

    .modal.modal--sheet {
        padding: 0;
    }

    .modal.modal--sheet > .modal-card,
    .modal.modal--sheet .setting-modal-card {
        max-height: none;
        border-radius: 0;
        padding: 0;
    }

    .modal-card {
        width: 100%;
        max-height: min(calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 760px);
        padding: 14px;
        border-radius: 18px;
    }

    .menu-sheet-head {
        padding-top: max(14px, env(safe-area-inset-top));
    }

    .menu-sheet-body {
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
    }

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

    .file-upload-row .secondary {
        width: 100%;
    }

    .modal-head {
        margin-bottom: 12px;
    }

    .modal-text {
        font-size: 0.88rem;
    }

    .app-modal-form {
        --field-height: 34px;
        --field-font-size: 0.84rem;
    }

    .app-modal-form .field-row {
        grid-template-columns: minmax(78px, 31%) minmax(0, 1fr);
        gap: 8px;
    }

    .profile-password-actions .secondary {
        width: 100%;
    }

    .profile-password-section .field-row > input {
        min-height: 38px;
        height: 38px;
        font-size: 0.88rem;
    }

    .app-modal-form textarea {
        min-height: 88px;
    }

    .color-palette--bars .color-choice {
        height: 28px;
        min-height: 28px;
    }
}

@media (max-width: 360px) {
    body.is-app .dashboard-overview {
        padding-right: 48px;
    }

    body.is-app .week-day strong {
        width: 28px;
        height: 28px;
        border-radius: 11px;
    }

    body.is-app .week-day span {
        font-size: 0.58rem;
    }

    body.is-app .checklist-head,
    body.is-app .check-row {
        grid-template-columns: minmax(0, 1fr) repeat(var(--member-count, 2), 28px);
    }

    body.is-app .check-button {
        width: 28px;
        height: 28px;
        border-radius: 9px;
    }

    body.is-app .member-head {
        font-size: 0.66rem;
    }
}

.file-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.file-upload-row input[type="file"] {
    min-height: 46px;
    padding: 10px 12px;
    font-size: 0.88rem;
}

.file-upload-hint {
    display: block;
    margin-top: 6px;
    color: var(--quiet);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.file-upload-hint.has-file {
    color: var(--primary);
}

/* Marketing mobile polish */
@media (max-width: 860px) {
    body:not(.is-app).is-scroll-locked {
        overflow: hidden;
    }

    body:not(.is-app).is-scroll-locked::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(45, 42, 38, 0.42);
        pointer-events: auto;
    }

    body:not(.is-app).is-scroll-locked > .site-header:not(.site-header--auth-minimal) {
        z-index: 80;
    }

    body:not(.is-app).is-scroll-locked .hero-actions,
    body:not(.is-app).is-scroll-locked .hero-meta {
        visibility: hidden;
    }

    body.is-landing .hero {
        padding-top: 20px;
        padding-bottom: 8px;
        gap: 22px;
    }

    body.is-landing .landing-showcase {
        margin-top: 0;
    }

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

    .landing-about-inner h2 {
        max-width: none;
    }

    body.is-landing .landing-home,
    body.is-home .landing-home {
        padding-bottom: 0;
    }

    .landing-block {
        margin-top: 28px;
    }

    .landing-block:first-child {
        margin-top: 32px;
    }
}

@media (max-width: 480px) {
    .brand-claim {
        display: none;
    }

    .brand-title {
        font-size: 0.98rem;
    }

    .logo {
        width: 38px;
        height: 38px;
    }

    body.is-landing .copy h1,
    body.is-landing h1 {
        font-size: clamp(2.35rem, 11.5vw, 3rem);
        line-height: 1.02;
    }


    .lead {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .hero-meta {
        margin-top: 10px;
    }

    body:not(.is-app):not(.is-landing):not(.is-home):not(.is-auth) .shell {
        width: min(100%, 100%);
        padding-top: 0;
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: 0;
    }

    body.is-auth > main.shell {
        width: min(100%, 100%);
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: 0;
    }

    .preview-card {
        padding: 18px;
        border-radius: 22px;
    }

    .landing-beta-link {
        width: 100%;
    }
}

