/* AI assisted development */
:root {
    --ink: #29241f;
    --muted: #756d63;
    --cream: #fbf7ee;
    --paper: #fffdf8;
    --honey: #f5c96a;
    --honey-dark: #d99d28;
    --coral: #ed806b;
    --sage: #83a98a;
    --blue: #749ec3;
    --border: #e9e0d3;
    --shadow: 0 18px 50px rgba(83, 64, 38, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "DM Sans", system-ui, sans-serif;
}

button,
input,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

.hidden {
    display: none !important;
}

.ambient {
    position: fixed;
    z-index: -1;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.25;
}

.ambient-one {
    top: -190px;
    right: -120px;
    background: var(--honey);
}

.ambient-two {
    bottom: -240px;
    left: -180px;
    background: var(--coral);
}

.login-screen {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
}

.login-card {
    width: min(100%, 540px);
    padding: clamp(32px, 7vw, 64px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 32px;
    background: rgba(255, 253, 248, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.brand-mark {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 28px;
    border-radius: 18px 18px 18px 5px;
    color: #5b4111;
    background: var(--honey);
    font-family: "Fraunces", Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    place-items: center;
    transform: rotate(-3deg);
}

.brand-mark.small {
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: 12px 12px 12px 4px;
    font-size: 20px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--honey-dark);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

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

h1,
h2 {
    font-family: "Fraunces", Georgia, serif;
}

h1 {
    margin-bottom: 14px;
    font-size: clamp(2.25rem, 8vw, 4rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.login-card h1 {
    max-width: 420px;
}

.login-copy {
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.login-card form label,
.claim-picker,
#reward-form label,
#reward-form .primary-button {
    margin-top: 16px;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.remember-row input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    accent-color: var(--honey-dark);
}

.login-card form label:first-child {
    margin-top: 0;
}

.claim-picker .assignee-options {
    grid-template-columns: 1fr 1fr;
}

.claim-picker p,
.field-hint {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.4;
}

.field-hint {
    margin: 8px 0 0;
}

label,
legend {
    display: block;
    margin-bottom: 8px;
    font-size: 0.83rem;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 13px;
    outline: none;
    color: var(--ink);
    background: white;
    transition: border-color 150ms, box-shadow 150ms;
}

input {
    min-height: 50px;
    padding: 0 15px;
}

textarea {
    min-height: 90px;
    padding: 14px 15px;
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--honey-dark);
    box-shadow: 0 0 0 4px rgba(245, 201, 106, 0.24);
}

.password-row {
    display: flex;
    gap: 10px;
}

.primary-button {
    min-height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    color: #3c2c0d;
    background: var(--honey);
    box-shadow: 0 5px 0 #dfaa39;
    font-weight: 700;
    cursor: pointer;
    transition: transform 120ms, box-shadow 120ms, background 120ms;
}

.primary-button:hover {
    background: #f8d583;
    transform: translateY(-1px);
}

.primary-button:active {
    box-shadow: 0 2px 0 #dfaa39;
    transform: translateY(3px);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.form-error {
    min-height: 20px;
    margin: 12px 0 0;
    color: #b74337;
    font-size: 0.86rem;
}

.topbar {
    display: flex;
    width: min(100% - 32px, 1050px);
    min-height: 82px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.text-button,
.icon-button {
    border: 0;
    color: var(--muted);
    background: transparent;
    font-weight: 600;
    cursor: pointer;
}

.text-button:hover,
.icon-button:hover {
    color: var(--ink);
}

.content {
    width: min(100% - 32px, 920px);
    margin: 52px auto 100px;
}

.hero {
    display: flex;
    margin-bottom: 36px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.hero h1 {
    margin-bottom: 10px;
}

.hero p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.add-button {
    flex: 0 0 auto;
}

.add-button span {
    margin-right: 5px;
    font-size: 1.25rem;
}

.session-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.signed-in {
    display: flex;
    margin: 0;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 700;
}

.signed-in-points {
    display: inline-flex;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    align-items: center;
    color: #5b4111;
    background: #fff1cc;
    font-size: 0.75rem;
    white-space: nowrap;
}

.shop-button {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #ecd7a0;
    border-radius: 14px;
    color: #5b4111;
    background: var(--honey);
    box-shadow: 0 3px 0 #dfaa39;
    cursor: pointer;
    place-items: center;
    transition: transform 120ms, box-shadow 120ms;
}

.shop-button:hover {
    transform: translateY(-1px);
}

.shop-button:active {
    box-shadow: 0 1px 0 #dfaa39;
    transform: translateY(2px);
}

.shop-button svg {
    width: 22px;
    height: 22px;
}

.shop-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    color: white;
    background: var(--coral);
    font-size: 0.65rem;
    font-weight: 700;
    place-items: center;
}

.view-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 18px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.75);
    gap: 5px;
}

.view-tab {
    display: flex;
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}

.view-tab span {
    display: grid;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 999px;
    color: var(--muted);
    background: #eee7dd;
    font-size: 0.72rem;
    place-items: center;
}

.view-tab.active {
    color: #3c2c0d;
    background: var(--honey);
}

.view-tab.active span {
    color: #3c2c0d;
    background: rgba(255, 253, 248, 0.8);
}

.filters {
    display: flex;
    margin-bottom: 28px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter {
    display: flex;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    align-items: center;
    gap: 8px;
    background: rgba(255, 253, 248, 0.75);
    font-size: 0.87rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.filter span {
    display: grid;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 999px;
    color: var(--muted);
    background: #eee7dd;
    font-size: 0.72rem;
    place-items: center;
}

.filter.active {
    border-color: var(--ink);
    color: white;
    background: var(--ink);
}

.filter.active span {
    color: var(--ink);
    background: var(--honey);
}

.status-message {
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid #e9b1aa;
    border-radius: 12px;
    color: #8e332a;
    background: #fff0ee;
    overflow-wrap: anywhere;
}

.undo-bar {
    display: flex;
    margin-bottom: 18px;
    padding: 10px 10px 10px 16px;
    border: 1px solid #ecd7a0;
    border-radius: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #fff6df;
}

.undo-bar p {
    margin: 0;
    overflow-wrap: anywhere;
}

.undo-button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 11px;
    color: #3c2c0d;
    background: var(--honey);
    font-weight: 700;
    cursor: pointer;
    flex: 0 0 auto;
}

.section-heading {
    display: flex;
    margin-bottom: 12px;
    padding: 0 4px;
    align-items: baseline;
    justify-content: space-between;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.3rem;
}

.section-heading span {
    color: var(--muted);
    font-size: 0.82rem;
}

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

.task-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 17px;
    align-items: start;
    gap: 14px;
    background: var(--paper);
    box-shadow: 0 5px 18px rgba(83, 64, 38, 0.05);
    transition: transform 160ms, box-shadow 160ms, opacity 160ms;
}

.task-card:hover {
    box-shadow: 0 9px 24px rgba(83, 64, 38, 0.09);
    transform: translateY(-1px);
}

.task-card.is-overdue {
    border-left: 4px solid var(--coral);
}

.task-check {
    display: grid;
    width: 25px;
    height: 25px;
    margin-top: 1px;
    padding: 0;
    border: 2px solid #cfc5b8;
    border-radius: 8px;
    color: white;
    background: white;
    cursor: pointer;
    place-items: center;
}

.task-check:hover {
    border-color: var(--sage);
}

.task-check span {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 120ms, transform 120ms;
}

.task-card.completed {
    opacity: 0.66;
}

.task-card.completed .task-check {
    border-color: var(--sage);
    background: var(--sage);
}

.task-card.completed .task-check span {
    opacity: 1;
    transform: scale(1);
}

.task-card.completed .task-title {
    text-decoration: line-through;
}

.task-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.task-notes {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

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

.badge,
.due-date {
    display: inline-flex;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge.andrew {
    color: #365e82;
    background: #e4eff8;
}

.badge.victoria {
    color: #8c493d;
    background: #fbe7e2;
}

.badge.general {
    color: #4d7053;
    background: #e6f0e7;
}

.due-date {
    color: #6c6257;
    background: #f0ebe4;
}

.due-date.overdue {
    color: #a4392f;
    background: #fde5e1;
}

.delete-button {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #9a9187;
    background: transparent;
    cursor: pointer;
    opacity: 0;
    transition: opacity 120ms, color 120ms, background 120ms;
}

.task-card:hover .delete-button,
.delete-button:focus-visible {
    opacity: 1;
}

.delete-button:hover {
    color: #a4392f;
    background: #fde8e5;
}

.empty-state {
    padding: 70px 20px;
    border: 1px dashed #d8cbbc;
    border-radius: var(--radius);
    text-align: center;
}

.empty-state h3 {
    margin-bottom: 6px;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.25rem;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.empty-illustration {
    display: flex;
    width: 74px;
    height: 58px;
    margin: 0 auto 20px;
    padding: 14px;
    border: 2px solid var(--ink);
    border-radius: 15px 15px 15px 4px;
    flex-direction: column;
    justify-content: space-around;
    transform: rotate(-3deg);
}

.empty-illustration span {
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
}

.empty-illustration span:nth-child(2) {
    width: 75%;
}

.restore-button {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #c9d8cb;
    border-radius: 999px;
    color: #3f6846;
    background: #f3f8f3;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.restore-button:hover {
    background: #e6f0e7;
}

.logged-by {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.bounty-pill {
    display: inline-flex;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    align-items: center;
    color: #5b4111;
    background: #fff1cc;
    font-size: 0.7rem;
    font-weight: 700;
}

.bounty-slider-block {
    margin-top: 20px;
}

.bounty-slider-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.bounty-slider-heading label {
    margin: 0;
}

.bounty-slider-heading strong {
    color: #5b4111;
    font-size: 0.95rem;
}

#bounty-slider {
    width: 100%;
    height: 28px;
    margin: 0;
    accent-color: var(--honey-dark);
    cursor: pointer;
}

.bounty-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.shop-dialog {
    width: min(calc(100% - 28px), 560px);
    max-height: min(90vh, 760px);
    overflow: auto;
    padding: clamp(24px, 6vw, 38px);
}

.shop-dialog .dialog-heading {
    margin-bottom: 18px;
}

.shop-dialog #reward-form {
    margin-bottom: 22px;
}

.balance-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 22px;
}

.balance-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--paper);
}

.balance-card.is-you {
    border-color: #ecd7a0;
    background: #fff6df;
}

.balance-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.balance-card strong {
    display: block;
    margin-top: 4px;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.8rem;
}

.reward-card {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.reward-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reward-actions .primary-button {
    min-height: 40px;
    padding: 0 14px;
    box-shadow: 0 4px 0 #dfaa39;
}

.claims-section {
    margin-bottom: 28px;
}

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

.claim-card {
    display: flex;
    padding: 16px 18px;
    border: 1px solid #ecd7a0;
    border-left: 4px solid var(--honey-dark);
    border-radius: 16px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #fffaf0;
}

.claim-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.claim-card .eyebrow {
    margin-bottom: 4px;
}

.claim-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.claim-meta time {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

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

.claimed-heading {
    margin-top: 28px;
}

.redemption-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.redemption-row strong {
    color: var(--ink);
}

dialog {
    width: min(calc(100% - 28px), 520px);
    padding: 0;
    border: 0;
    border-radius: 25px;
    color: var(--ink);
    background: var(--paper);
    box-shadow: var(--shadow);
}

dialog::backdrop {
    background: rgba(41, 36, 31, 0.45);
    backdrop-filter: blur(3px);
}

dialog form {
    padding: clamp(24px, 6vw, 38px);
}

.dialog-heading {
    display: flex;
    margin-bottom: 28px;
    align-items: flex-start;
    justify-content: space-between;
}

.dialog-heading h2 {
    margin: 0;
    font-size: 1.7rem;
}

.icon-button {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.6rem;
}

dialog label,
dialog fieldset {
    margin-top: 20px;
}

fieldset {
    padding: 0;
    border: 0;
}

.assignee-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.assignee-option {
    margin: 0;
    cursor: pointer;
}

.assignee-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.assignee-option span {
    display: grid;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    font-size: 0.8rem;
    place-items: center;
}

.assignee-option input:focus-visible + span {
    outline: 3px solid rgba(245, 201, 106, 0.5);
}

.assignee-option input:checked + span {
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
}

.assignee-option.andrew input:checked + span {
    background: #e4eff8;
}

.assignee-option.victoria input:checked + span {
    background: #fbe7e2;
}

.assignee-option.general input:checked + span {
    background: #e6f0e7;
}

.optional {
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 500;
}

.full-width {
    width: 100%;
    margin-top: 8px;
}

.confetti {
    position: fixed;
    inset: 0;
    z-index: 20;
    overflow: hidden;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    top: -15px;
    width: 9px;
    height: 15px;
    border-radius: 2px;
    animation: fall 900ms ease-in forwards;
}

@keyframes fall {
    to {
        opacity: 0;
        transform: translate3d(var(--drift), 105vh, 0) rotate(540deg);
    }
}

@media (max-width: 620px) {
    .topbar {
        gap: 12px;
    }

    .brand-name {
        display: none;
    }

    .session-box {
        min-width: 0;
        gap: 8px;
    }

    .signed-in {
        min-width: 0;
        flex-direction: column;
        align-items: flex-end;
        gap: 3px;
        line-height: 1.1;
    }

    .signed-in-name {
        max-width: 100%;
        overflow-wrap: anywhere;
        text-align: right;
    }

    .logout-button {
        min-height: 42px;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 12px;
        color: var(--ink);
        background: var(--paper);
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .password-row {
        flex-direction: column;
    }

    .content {
        margin-top: 32px;
    }

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

    .hero h1 {
        font-size: 2.8rem;
    }

    .add-button {
        width: 100%;
    }

    .claim-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .task-card {
        grid-template-columns: auto 1fr auto;
        padding: 15px;
        gap: 11px;
    }

    .delete-button {
        opacity: 1;
    }

    .assignee-options,
    .balance-board,
    .reward-card,
    .reward-actions {
        grid-template-columns: 1fr;
    }

    .reward-actions {
        display: flex;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
