:root {
    --bg: #f8f7f3;
    --surface: #fffefb;
    --ink: #303b36;
    --muted: #647066;
    --line: #dedfd5;
    --control: #899181;
    --sidebar-width: 266px;
    --sidebar-gutter: 24px;
    --page-gutter: 40px;
    --content-top: 40px;
    --orange: #ad5132;
    --orange-hover: #914129;
    --sage: #e4eddf;
    --peach: #fae7d8;
    --lavender: #ece6f5;
    --blue: #e3edf3;
    --rose: #f5e3e5;
    --workday: #f5e3e1
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

a {
    color: inherit;
    text-decoration: none
}

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

button, a, input, select, textarea {
    touch-action: manipulation
}

button, a {
    -webkit-tap-highlight-color: transparent
}

button {
    cursor: pointer
}

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

h1, h2, h3, p {
    margin-top: 0
}

h1 {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -1.3px
}

h2 {
    font-weight: 600;
    letter-spacing: -.6px
}

h3 {
    font-size: 14px;
    font-weight: 600
}

small, .small {
    font-size: 12px
}

.muted {
    color: var(--muted)
}

.orange {
    color: var(--orange)
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 1.4px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 14px
}

.topbar {
    height: 84px;
    display: grid;
    grid-template-columns:var(--sidebar-width) minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--page-gutter) 0 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface)
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 29px;
    letter-spacing: -1.2px;
    font-weight: 400
}

.topbar > .brand {
    height: 100%;
    padding: 0 var(--sidebar-gutter);
    border-right: 1px solid var(--line)
}

.brand-icon {
    display: block;
    width: 42px;
    height: 44px;
    flex-shrink: 0
}

.brand-name {
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1;
    color: var(--ink)
}

.brand-caption {
    font-size: 12px;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--muted);
    padding-left: var(--page-gutter)
}

.account {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px
}

.account form {
    margin-left: 8px
}

.avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-content: center;
    background: #e8ecdf;
    border-radius: 50%;
    color: #4d6649
}

.text-button {
    border: 0;
    background: none;
    color: var(--muted);
    padding: 8px 0
}

.text-button:hover, a:hover {
    color: var(--orange)
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid var(--control);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 17px;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap
}

.button:hover {
    border-color: var(--orange);
    background: #f5eee6;
    color: var(--orange)
}

.primary {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange)
}

.primary:hover {
    background: var(--orange-hover);
    color: #fff
}

.full {
    width: 100%
}

.app-layout {
    display: grid;
    grid-template-columns:var(--sidebar-width) minmax(0, 1fr);
    min-height: calc(100vh - 84px)
}

.sidebar {
    border-right: 1px solid var(--line);
    padding: var(--content-top) var(--sidebar-gutter);
    display: flex;
    flex-direction: column
}

.sidebar h2 {
    font-size: 21px;
    margin-bottom: 24px
}

.sidebar .eyebrow {
    font-size: 11px;
    margin-bottom: 12px
}

.calendar-nav {
    display: grid;
    gap: 7px
}

.calendar-nav a {
    padding: 11px 13px;
    font-size: 13px;
    border-radius: 9px;
    display: flex;
    gap: 12px;
    align-items: center;
    overflow-wrap: anywhere
}

.calendar-nav .active {
    background: #e9ede3;
    color: #52634b;
    font-weight: 600
}

.calendar-nav .active span {
    font-size: 19px
}

.calendar-nav .new-calendar {
    color: var(--muted);
    font-size: 12px
}

.sidebar-section {
    margin-top: 32px
}

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

.section-heading h3 {
    margin: 0
}

summary.section-heading {
    cursor: pointer;
    min-height: 44px;
    list-style: none
}

summary.section-heading::-webkit-details-marker {
    display: none
}

summary.section-heading:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px
}

.template-chevron {
    font-size: 22px
}

details[open] .template-chevron {
    transform: rotate(180deg)
}

.create-template {
    width: 100%;
    margin-bottom: 18px
}

.icon-button {
    border: 1px solid var(--control);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-content: center;
    font-size: 20px;
    background: transparent
}

.sidebar-section > .muted {
    font-size: 12px;
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 18px
}

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

.template-card {
    border-radius: 10px;
    padding: 16px;
    cursor: grab;
    position: relative
}

.template-title {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-wrap: anywhere
}

.template-title strong {
    font-size: 13px;
    font-weight: 500;
    flex: 1
}

.template-title a {
    font-size: 19px;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: inline-grid;
    place-items: center;
    margin: -12px -12px -12px 0
}

.template-card small {
    display: block;
    font-size: 12px;
    margin: 8px 0 0 15px
}

.edit-template::after, .event-card > a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit
}

.plan-template {
    position: relative;
    z-index: 1;
    font-size: 12px;
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 8px 0 -12px 15px
}

.color-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0
}

.sage {
    background: var(--sage);
    color: #4d6649
}

.peach {
    background: var(--peach);
    color: #795234
}

.lavender {
    background: var(--lavender);
    color: #625175
}

.blue {
    background: var(--blue);
    color: #3e6171
}

.rose {
    background: var(--rose);
    color: #7b4853
}

.sidebar-note {
    margin-top: auto;
    padding-top: 45px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted)
}

.sidebar-note span {
    font-size: 35px;
    color: #cba768
}

.sidebar-note p {
    font-size: 12px;
    margin: 0;
    line-height: 1.7
}

.empty-templates {
    padding: 22px 12px;
    text-align: center;
    border: 1px dashed #d9dfd0;
    border-radius: 9px;
    color: var(--muted);
    font-size: 12px
}

.empty-templates > span {
    font-size: 28px;
    color: #9caa87
}

.empty-templates p {
    margin: 8px 0
}

.empty-templates a {
    font-size: 12px;
    color: #4d6649
}

.calendar-main {
    padding: var(--content-top) var(--page-gutter) 24px;
    min-width: 0
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 32px
}

.page-heading h1 {
    margin-bottom: 10px
}

.page-heading p {
    margin-bottom: 8px
}

.page-heading .eyebrow {
    margin-bottom: 12px
}

.page-heading .muted {
    font-size: 14px
}

.share-button {
    background: transparent
}

.share-button span {
    font-size: 18px;
    line-height: 1
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 15px
}

.month-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap
}

.month-nav h2 {
    font-size: 21px;
    margin: 0 16px 0 0;
    text-transform: capitalize;
    white-space: nowrap
}

.today-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    border: 1px solid var(--control);
    border-radius: 8px;
    padding: 6px 11px;
    margin-left: 0
}

.toolbar-right {
    display: flex;
    gap: 20px;
    align-items: center
}

.view-label {
    font-size: 12px;
    color: var(--muted)
}

.calendar-surface {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface)
}

.weekdays {
    display: grid;
    grid-template-columns:repeat(7, minmax(0, 1fr));
    background: #f2f3ed;
    border-bottom: 1px solid var(--line)
}

.weekdays span {
    padding: 13px 15px;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--muted)
}

.weekdays span:nth-last-child(-n+2) {
    color: #805f49
}

.month-grid {
    display: grid;
    grid-template-columns:repeat(7, minmax(0, 1fr))
}

.day {
    min-height: 122px;
    padding: 11px 8px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    min-width: 0
}

.day:nth-child(7n) {
    border-right: 0;
    background: #fcfbf7
}

.day:nth-child(7n - 1) {
    background: #fcfbf7
}

.day:nth-last-child(-n+7) {
    border-bottom: 0
}

.day.outside {
    background: #f7f7f2
}

.outside .day-number {
    color: #6a7465
}

.day-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    min-height: 25px;
    padding: 0 4px
}

.day-number {
    font-size: 12px
}

.is-today .day-number {
    background: var(--orange);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: grid;
    place-content: center
}

.day.is-today {
    background: #fcf0e6
}

.day.is-workday {
    background: var(--workday)
}

.workday-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px
}

.workday-legend > span {
    width: 12px;
    height: 12px;
    border: 1px solid #b96760;
    border-radius: 3px;
    background: var(--workday)
}

.add-day {
    opacity: 0;
    font-size: 17px;
    color: var(--muted);
    padding: 0 4px
}

.day:hover .add-day, .day:focus-within .add-day {
    opacity: 1
}

.event-card {
    position: relative;
    border-radius: 8px;
    padding: 10px 8px;
    margin-bottom: 7px;
    display: flex;
    gap: 7px;
    align-items: flex-start;
    cursor: grab
}

.event-card:not([draggable]), .template-card:not([draggable]) {
    cursor: default
}

.event-card a, .event-card > div {
    min-width: 0;
    flex: 1
}

.event-card strong {
    font-size: 12px;
    font-weight: 500;
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.4
}

.event-card small {
    font-size: 11px;
    display: block;
    margin-top: 5px
}

.event-check {
    position: relative;
    z-index: 1;
    border: 1px solid currentColor;
    border-radius: 4px;
    width: 16px;
    height: 16px;
    padding: 0;
    flex-shrink: 0;
    background: transparent;
    font-size: 11px;
    margin-top: 2px;
    line-height: 14px;
    color: inherit
}

.event-check:hover {
    background: var(--surface)
}

.completed strong {
    text-decoration: line-through
}

.calendar-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 16px
}

.calendar-tip {
    display: flex;
    gap: 13px;
    padding: 20px;
    margin-top: 22px;
    background: #eeeee5;
    border-radius: 9px;
    align-items: center;
    font-size: 12px;
    color: #536048
}

.calendar-tip > span {
    font-size: 24px
}

.calendar-tip p {
    margin: 0
}

.calendar-tip strong {
    font-weight: 500
}

.mobile-day {
    display: none
}

.drag-over {
    box-shadow: inset 0 0 0 2px var(--orange);
    background: #fff5e9 !important
}

.dragging {
    opacity: .5
}

.centered {
    max-width: 720px;
    margin: 55px auto;
    padding: 0 20px
}

.form-card {
    padding: 38px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px
}

.form-card h1 {
    font-size: 28px;
    margin: 22px 0
}

.form-card h2 {
    font-size: 24px
}

.form-card p {
    font-size: 14px
}

.form-card form p {
    margin-bottom: 20px
}

.form-card label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 7px
}

input, textarea, select {
    width: 100%;
    border: 1px solid var(--control);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 12px;
    min-height: 46px
}

input:focus, textarea:focus, select:focus {
    outline: 3px solid var(--orange);
    outline-offset: 1px
}

.helptext {
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-top: 6px
}

.helptext ul {
    padding-left: 16px;
    margin: 8px 0
}

.errorlist {
    font-size: 12px;
    color: #9c4034;
    list-style: none;
    padding: 0
}

.back {
    font-size: 12px;
    color: var(--muted)
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px
}

.delete-form {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 18px
}

.danger {
    color: #9c4034
}

.form-footer {
    margin: 25px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 12px
}

.form-footer a {
    color: var(--orange)
}

.auth-layout {
    display: grid;
    grid-template-columns:1fr 420px;
    gap: 100px;
    max-width: 1100px;
    padding: 80px 30px;
    margin: 0 auto;
    align-items: center
}

.auth-intro h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 52px;
    font-weight: 400;
    line-height: 1.13;
    letter-spacing: -1px;
    margin-bottom: 24px
}

.auth-intro h1 span {
    color: var(--orange)
}

.auth-intro > p:not(.eyebrow) {
    max-width: 340px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8
}

.intro-art {
    position: relative;
    height: 190px;
    margin-top: 30px
}

.intro-art > span {
    position: absolute;
    right: 55px;
    top: 0;
    font-size: 68px;
    color: #dbbd75
}

.intro-art > div {
    background: var(--sage);
    color: #4d6649;
    padding: 18px 22px;
    width: 250px;
    border-radius: 12px;
    transform: rotate(-4deg);
    position: absolute;
    top: 20px;
    left: 0;
    box-shadow: 0 4px 15px #303b3608
}

.intro-art small {
    font-size: 12px
}

.intro-art > div:last-child {
    background: var(--peach);
    color: #795234;
    top: 103px;
    left: 55px;
    transform: rotate(4deg)
}

.auth-card {
    box-shadow: 0 15px 45px #303b3605
}

.landing {
    max-width: 1160px;
    margin: 0 auto;
    padding: 72px 30px
}

.landing-hero {
    display: grid;
    grid-template-columns:minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: center;
    gap: 70px;
    margin-bottom: 64px
}

.landing h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 52px;
    font-weight: 400;
    line-height: 1.13;
    letter-spacing: -1px;
    margin-bottom: 24px
}

.landing h1 span {
    color: var(--orange)
}

.landing-description {
    max-width: 480px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px
}

.landing-features {
    display: grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap: 20px
}

.landing-features .form-card {
    padding: 28px
}

.landing-features h2 {
    font-size: 22px
}

.landing-features .form-card > p:last-child {
    margin-bottom: 0;
    color: var(--muted)
}

@media (max-width: 900px) {
    .landing {
        padding: 40px 20px
    }

    .landing-hero {
        grid-template-columns:minmax(0, 1fr);
        gap: 16px;
        margin-bottom: 36px
    }

    .landing h1 {
        font-size: 38px
    }

    .landing-hero > .intro-art {
        display: none
    }

    .landing-features {
        grid-template-columns:minmax(0, 1fr)
    }
}

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

.member-row small {
    display: block;
    color: var(--muted)
}

.pill {
    border-radius: 20px;
    background: var(--sage);
    font-size: 11px;
    padding: 4px 10px
}

.invitation {
    margin-top: 26px;
    border-top: 1px solid var(--line);
    padding-top: 22px
}

.copy-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px
}

.copy-row input {
    min-width: 0;
    font-size: 12px
}

.messages {
    margin: 15px auto;
    max-width: 720px;
    padding: 10px 20px;
    color: #52634b;
    background: var(--sage);
    border-radius: 8px
}

.messages p {
    margin: 0
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    background: #384738;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px #0002;
    z-index: 10
}

@media (min-width: 1500px) {
    :root {
        --page-gutter: 64px
    }

    .day {
        min-height: 145px
    }

    .event-card strong {
        font-size: 13px
    }

    .event-card small {
        font-size: 12px
    }
}

@media (max-width: 1100px) {
    :root {
        --page-gutter: 20px;
        --content-top: 24px
    }

    .month-nav h2 {
        margin-right: 8px;
        font-size: 18px
    }

    .toolbar-right {
        gap: 10px
    }

    .auth-layout {
        gap: 50px;
        padding-top: 60px
    }

    .auth-intro h1 {
        font-size: 44px
    }

    .day {
        padding: 8px 4px;
        min-height: 110px
    }

    .event-card {
        padding: 9px 6px
    }
}

@media (max-width: 1100px) {
    .topbar {
        height: 70px;
        display: flex;
        padding: 0 var(--page-gutter)
    }

    .topbar > .brand {
        height: auto;
        padding: 0;
        border-right: 0
    }

    .brand-caption {
        display: none
    }

    .brand {
        font-size: 23px
    }

    .account {
        gap: 8px;
        margin-left: auto
    }

    .app-layout {
        display: flex;
        flex-direction: column
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: var(--content-top) var(--page-gutter)
    }

    .sidebar > .eyebrow, .sidebar > h2, .sidebar-note {
        display: none
    }

    .calendar-nav {
        display: flex;
        overflow-x: auto;
        gap: 8px
    }

    .calendar-nav a {
        flex-shrink: 0
    }

    .sidebar-section {
        margin-top: 20px
    }

    .template-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 5px
    }

    .template-card {
        min-width: 170px
    }

    .empty-templates {
        display: flex;
        align-items: center;
        gap: 15px;
        width: 100%;
        padding: 12px;
        text-align: left
    }

    .empty-templates p {
        margin: 0
    }

    .calendar-main {
        padding: var(--content-top) var(--page-gutter)
    }

    .page-heading {
        margin-bottom: 25px
    }

    .page-heading h1 {
        font-size: 28px
    }

    .page-heading .eyebrow {
        font-size: 11px
    }

    .calendar-toolbar {
        flex-wrap: wrap
    }

    .month-nav h2 {
        font-size: 20px
    }

    .weekdays {
        display: none
    }

    .month-grid {
        display: flex;
        flex-direction: column
    }

    .day {
        min-height: 80px;
        border-right: 0;
        padding: 12px 15px;
        border-bottom: 1px solid var(--line) !important
    }

    .day:last-child {
        border-bottom: 0 !important
    }

    .day.outside {
        display: none
    }

    .day-heading {
        justify-content: flex-start;
        gap: 12px
    }

    .day-number {
        font-size: 14px;
        width: 25px;
        text-align: center
    }

    .mobile-day {
        display: inline;
        font-size: 12px;
        color: var(--muted);
        text-transform: capitalize
    }

    .add-day {
        opacity: 1;
        margin-left: auto
    }

    .event-card {
        padding: 12px;
        margin-left: 37px;
        gap: 9px
    }

    .event-card strong {
        font-size: 13px
    }

    .event-card small {
        font-size: 11px
    }

    .event-check {
        display: block;
        width: 20px;
        height: 20px;
        font-size: 13px;
        line-height: 18px
    }

    .calendar-footer {
        font-size: 11px;
        flex-wrap: wrap
    }

    .view-label {
        display: none
    }

    .auth-layout {
        display: block;
        max-width: 500px;
        padding: 32px var(--page-gutter)
    }

    .auth-intro {
        display: none
    }

    .form-card {
        padding: 26px
    }

    .centered {
        margin-top: 25px
    }

    .toolbar-right .button {
        min-height: 44px;
        padding: 9px 14px
    }

    .calendar-tip {
        font-size: 12px
    }

    .copy-row {
        flex-direction: column
    }
}

@media (prefers-reduced-motion: no-preference) {
    a, button {
        transition: color .15s, background .15s, border-color .15s
    }
}

.event-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.template-card a:hover, .event-card a:hover {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px
}

.completed .event-check {
    background: var(--ink);
    color: var(--surface);
    border-color: var(--ink)
}

.account > span:not(.avatar) {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

@media (max-width: 1100px) {
    input, textarea, select {
        font-size: 16px
    }

    .topbar {
        height: auto;
        min-height: 70px;
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 14px;
        padding-bottom: 14px
    }

    .page-heading {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .account > span:not(.avatar) {
        max-width: 100px
    }
}

@media (pointer: coarse) {
    .icon-button {
        width: 44px;
        height: 44px
    }

    .today-button {
        min-height: 44px;
        display: inline-flex;
        align-items: center
    }

    .event-check {
        width: 44px;
        height: 44px;
        font-size: 18px;
        line-height: 42px;
        margin-top: 0
    }

    .event-card {
        align-items: center
    }

    .add-day {
        min-width: 44px;
        min-height: 44px;
        display: inline-grid;
        place-content: center
    }
}

.color-options {
    border: 0;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.color-options legend {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 7px
}

.form-card .color-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin: 0;
    border: 1px solid var(--control);
    border-radius: 9px;
    cursor: pointer
}

.color-choice input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    accent-color: var(--orange)
}

.color-choice:has(input:checked) {
    border-color: var(--orange);
    box-shadow: inset 0 0 0 1px var(--orange)
}

.color-swatch {
    width: 22px;
    height: 22px;
    border: 1px solid currentColor;
    border-radius: 50%;
    flex-shrink: 0
}

.template-group {
    display: grid;
    gap: 10px;
    min-width: 0
}

.template-group h4 {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--muted);
    overflow-wrap: anywhere
}

.template-group-cards {
    display: grid;
    gap: 10px
}

.card-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 5px
}

.template-picker {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    width: min(440px, calc(100% - 32px));
    max-height: 80vh;
    color: var(--ink);
    background: var(--surface)
}

.template-picker::backdrop {
    background: #303b3666
}

.picker-close {
    float: right
}

.template-picker h2 {
    font-size: 22px
}

.picker-label {
    margin-top: 24px
}

.picker-templates {
    display: grid;
    gap: 8px;
    margin-bottom: 20px
}

.template-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 12px;
    text-align: left;
    overflow-wrap: anywhere
}

@media (max-width: 1100px) {
    .template-group {
        width: auto;
        flex-shrink: 0;
        align-content: start
    }

    .template-group-cards {
        display: flex
    }

    .template-group .template-card {
        width: 200px;
        flex-shrink: 0
    }

    .toolbar-right {
        flex-wrap: wrap
    }
}
