:root {
    --ink: #20323a;
    --ink-soft: #405159;
    --teal: #1c8b78;
    --teal-deep: #156b5d;
    --coral: #ff9b6f;
    --butter: #ffd76a;
    --sky: #9ed9f5;
    --cream: #fff8ef;
    --paper: #fffdf8;
    --mint: #dff7ec;
    --rose: #ffe2d7;
    --line: #1f3138;
    --success: #2c9c74;
    --danger: #d95f55;
    --shadow-block: 8px 8px 0 #1f3138;
    --shadow-block-soft: 5px 5px 0 rgba(31, 49, 56, 0.7);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --transition: 220ms ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Sora", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 18px 18px, rgba(255, 215, 106, 0.45) 0 7px, transparent 8px),
        radial-gradient(circle at 78px 44px, rgba(158, 217, 245, 0.45) 0 8px, transparent 9px),
        radial-gradient(circle at 34px 84px, rgba(255, 155, 111, 0.28) 0 10px, transparent 11px),
        linear-gradient(180deg, #fff9f0 0%, #fff1de 48%, #f7fff9 100%);
    background-size: 120px 120px, 160px 160px, 180px 180px, auto;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.55;
    filter: blur(10px);
}

body::before {
    top: -5rem;
    right: -5rem;
    width: 18rem;
    height: 18rem;
    background: rgba(255, 155, 111, 0.3);
}

body::after {
    bottom: -6rem;
    left: -4rem;
    width: 20rem;
    height: 20rem;
    background: rgba(158, 217, 245, 0.25);
}

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

button {
    border: 0;
}

.container,
.app-container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.home-page {
    padding: 1.1rem 0 1.8rem;
    min-height: calc(100vh - 2.9rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.home-hero {
    position: relative;
    display: block;
    width: min(100%, 760px);
    margin-bottom: 1.4rem;
}

.hero-copy,
.hero-insight-card,
.app-card,
.app-container > header,
.form-card,
.table-card,
.review-style .preview,
.response-card,
.todo-section,
.task-form-section {
    position: relative;
    border: 3px solid var(--line);
    box-shadow: var(--shadow-block);
}

.hero-copy {
    padding: clamp(1.35rem, 2.5vw, 1.9rem);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 232, 0.98)),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 215, 106, 0.16) 0,
            rgba(255, 215, 106, 0.16) 14px,
            transparent 14px,
            transparent 28px
        );
    overflow: hidden;
}

.hero-copy::before {
    content: "";
    position: absolute;
    inset: auto -1.6rem -2rem auto;
    width: 6.8rem;
    height: 6.8rem;
    border-radius: 42% 58% 58% 42%;
    background: var(--coral);
    border: 3px solid var(--line);
}

.hero-copy::after {
    content: "Cats + Dogs";
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    z-index: 1;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: var(--butter);
    border: 3px solid var(--line);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker,
.panel-eyebrow,
.card-kicker,
.insight-chip,
.panel-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: fit-content;
    padding: 0.5rem 0.9rem;
    border: 3px solid var(--line);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-kicker {
    margin-bottom: 1rem;
    background: var(--butter);
}

.panel-eyebrow,
.card-kicker {
    background: var(--mint);
}

.insight-chip {
    background: var(--paper);
    color: var(--teal-deep);
}

.home-hero h1,
.app-title,
.app-container h1,
.card-heading h2,
.preview h2,
.responses h2,
.todo-section h3 {
    font-family: "Fredoka", "Trebuchet MS", sans-serif;
    letter-spacing: -0.03em;
}

.home-hero h1 {
    max-width: none;
    font-size: clamp(2.5rem, 4vw, 3.7rem);
    line-height: 0.95;
}

.subtitle,
.hero-note,
.panel-subtitle,
.app-desc,
.preview-box p,
.task-label,
label,
th,
td {
    line-height: 1.65;
}

.subtitle {
    max-width: 28rem;
    font-size: 0.98rem;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 180px));
    gap: 0.8rem;
    align-items: start;
    justify-content: center;
    width: fit-content;
}

.app-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: auto;
    padding: 0.9rem 1rem;
    overflow: visible;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition);
}

.app-card-button {
    width: 100%;
    appearance: none;
    cursor: pointer;
}

.app-card:nth-child(1) {
    border-radius: 18px;
    background: linear-gradient(180deg, #fffdf8 0%, #fff1e7 100%);
}

.app-card:nth-child(2) {
    border-radius: 18px;
    background: linear-gradient(180deg, #f7fffb 0%, #e5fbf0 100%);
}

.app-card:nth-child(3) {
    border-radius: 18px;
    background: linear-gradient(180deg, #fffef4 0%, #fff5c8 100%);
}

.app-card:hover {
    transform: translate(-2px, -3px);
}

.panel-chip {
    margin-bottom: 0.9rem;
    background: var(--paper);
}

.app-icon {
    display: inline-grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    margin-bottom: 0;
    border: 3px solid var(--line);
    border-radius: 16px;
    background: #fff;
    font-size: 1.35rem;
}

.app-title {
    font-size: 1rem;
    line-height: 1;
    margin-bottom: 0;
}

.app-desc {
    color: var(--ink-soft);
    font-size: 0.94rem;
}

.app-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 1rem;
    font-weight: 800;
}

.app-card-link::after {
    content: "\2192";
}

.app-desc,
.app-card-link,
.hero-insight-card,
.insight-chip {
    display: none;
}

.hidden {
    display: none;
}

.back-btn,
.intake-style form button,
.review-style form button,
.planner-style form button,
.task-icon {
    border: 3px solid var(--line);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.back-btn,
.intake-style form button,
.review-style form button,
.planner-style form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.92rem 1.45rem;
    border-radius: 18px;
    font-weight: 800;
    cursor: pointer;
}

.back-btn {
    margin: 1.2rem 0 1rem;
    background: var(--paper);
    box-shadow: var(--shadow-block-soft);
}

.back-btn:hover,
.intake-style form button:hover:not(:disabled),
.review-style form button:hover:not(:disabled),
.planner-style form button:hover,
.task-icon:hover {
    transform: translate(-2px, -3px);
}

.app-container {
    margin-bottom: 2rem;
    padding: 1rem 0 2rem;
}

.app-container > header {
    padding: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 1.35rem;
    border-radius: 30px;
    background:
        linear-gradient(135deg, #fffbf5 0%, #fff1da 100%);
}

.app-container > header::after {
    content: "";
    position: absolute;
    inset: auto 1.15rem 1rem auto;
    width: 8.3rem;
    height: 2.1rem;
    border-radius: 999px;
    background:
        repeating-linear-gradient(
            90deg,
            var(--coral) 0,
            var(--coral) 12px,
            transparent 12px,
            transparent 22px
        );
    opacity: 0.8;
}

.app-container h1 {
    max-width: 14ch;
    font-size: clamp(2.45rem, 4vw, 3.9rem);
    line-height: 0.95;
    margin-top: 0.9rem;
}

.panel-subtitle {
    max-width: 44rem;
    margin-top: 0.9rem;
    color: var(--ink-soft);
}

.card-heading {
    margin-bottom: 1.2rem;
}

.card-heading h2,
.preview h2,
.responses h2,
.todo-section h3 {
    font-size: 2rem;
    line-height: 1.04;
}

.card-heading.split {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}

.intake-style main,
.planner-style main {
    display: grid;
    gap: 1.3rem;
}

.intake-style main {
    grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
    align-items: start;
}

.review-style .container {
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(300px, 0.82fr);
    gap: 1.3rem;
    margin: 0 auto 1.3rem;
    padding: 0;
}

.form-card,
.table-card,
.review-style .preview,
.response-card,
.task-form-section {
    padding: 1.45rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
}

.reservation-form,
.feedback-form,
.task-form-section {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 239, 0.98));
}

.filter-group {
    min-width: 14rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.48rem;
    font-size: 0.95rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.92rem 1rem;
    margin-bottom: 0.82rem;
    border: 3px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 4px 4px 0 rgba(31, 49, 56, 0.18);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

input::placeholder,
textarea::placeholder {
    color: #6d7f87;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(28, 139, 120, 0.14), 4px 4px 0 rgba(31, 49, 56, 0.18);
    transform: translateY(-1px);
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

.intake-style form button,
.review-style form button,
.planner-style form button {
    background: var(--coral);
    color: var(--ink);
    box-shadow: var(--shadow-block-soft);
}

.intake-style form button:disabled,
.review-style form button:disabled {
    background: #d7d9dd;
    color: #6b7278;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.error {
    display: none;
    margin: -0.18rem 0 0.82rem;
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 700;
}

.table-container,
.response-card {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 36rem;
    border-collapse: separate;
    border-spacing: 0;
    border: 3px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
}

th,
td {
    padding: 0.92rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 2px solid rgba(31, 49, 56, 0.16);
}

th {
    background: var(--teal);
    color: #fffef9;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

tbody tr:nth-child(odd) {
    background: #fffaf2;
}

tbody tr:nth-child(even) {
    background: #f4fff9;
}

tbody tr:hover {
    background: #fff1da;
}

.empty-row td {
    text-align: center;
    font-weight: 700;
    color: var(--ink-soft);
}

.review-style .preview {
    position: sticky;
    top: 1.5rem;
    display: grid;
    gap: 1rem;
    align-self: start;
    background: linear-gradient(180deg, #f4fff9 0%, #eefbf6 100%);
}

.preview-box {
    padding: 1.15rem;
    border: 3px dashed var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
}

.preview-box p + p {
    margin-top: 0.4rem;
}

.preview-box strong {
    color: var(--teal-deep);
}

.summary-box {
    background: linear-gradient(180deg, #fff8ef 0%, #fff0d7 100%);
}

.planner-style main {
    max-width: 1080px;
    margin: 0 auto;
}

.todo-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.3rem;
}

.todo-section {
    overflow: hidden;
    border-radius: 28px;
    background: #fffdf8;
}

.todo-section h3 {
    padding: 1.15rem 1.35rem;
    background: var(--butter);
    border-bottom: 3px solid var(--line);
}

.task-list {
    list-style: none;
    min-height: 16rem;
    max-height: 30rem;
    overflow-y: auto;
    padding: 0.8rem;
}

.task-list li {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 0.8rem;
    padding: 1rem;
    border: 3px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 4px 4px 0 rgba(31, 49, 56, 0.16);
}

.task-list li:last-child {
    margin-bottom: 0;
}

.empty-task {
    justify-content: center;
    align-items: center;
    min-height: 12rem;
    text-align: center;
    font-weight: 700;
    color: var(--ink-soft);
    background: #fff7e9;
}

.task-label {
    flex: 1;
}

.task-label strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.04rem;
}

.task-label small,
.task-label em {
    display: block;
    color: var(--ink-soft);
}

.task-label em {
    margin-top: 0.2rem;
    font-style: normal;
}

.task-icons {
    display: flex;
    gap: 0.55rem;
    flex-shrink: 0;
}

.task-icon {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 14px;
    background: var(--paper);
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 3px 3px 0 rgba(31, 49, 56, 0.18);
}

.complete-icon:hover,
.restore-icon:hover {
    background: var(--mint);
    color: var(--teal-deep);
}

.delete-icon:hover {
    background: var(--rose);
    color: var(--danger);
}

.priority-urgent {
    color: #c94f44;
}

.priority-high {
    color: #da6b28;
}

.priority-medium {
    color: #ab7c18;
}

.priority-low {
    color: var(--success);
}

.toast-region {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    gap: 0.7rem;
    width: min(21rem, calc(100% - 2rem));
    z-index: 40;
}

.toast {
    padding: 0.95rem 1rem;
    border: 3px solid var(--line);
    border-radius: 18px;
    background: #fffef8;
    box-shadow: var(--shadow-block-soft);
    opacity: 0;
    transform: translateY(0.8rem);
    animation: toastIn 280ms ease forwards;
}

.toast.success {
    background: #ecfff5;
}

.toast.info {
    background: #fff1e3;
}

.toast.fade-out {
    animation: toastOut 260ms ease forwards;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(1.5rem) rotate(0.4deg);
    transition: opacity 650ms ease, transform 650ms ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.panel-shell.panel-live {
    animation: panelIn 360ms ease both;
}

::-webkit-scrollbar {
    width: 0.72rem;
    height: 0.72rem;
}

::-webkit-scrollbar-track {
    background: rgba(31, 49, 56, 0.08);
}

::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, var(--coral), var(--teal));
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(0.8rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(0.6rem);
    }
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(0.8rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .todo-lists,
    .intake-style main,
    .review-style .container {
        grid-template-columns: 1fr;
    }

    .review-style .preview {
        position: static;
    }
}

@media (max-width: 768px) {
    .home-page {
        justify-content: center;
    }

    .app-grid {
        grid-template-columns: 1fr;
        width: min(100%, 320px);
    }

    .card-heading.split,
    .form-row {
        flex-direction: column;
    }

    .task-list li {
        flex-direction: column;
    }

    .task-icons {
        width: 100%;
        justify-content: flex-end;
    }

    .back-btn,
    .planner-style form button,
    .intake-style form button,
    .review-style form button {
        width: 100%;
    }

    .app-card {
        justify-content: flex-start;
    }

    table {
        min-width: 32rem;
    }
}

@media (max-width: 540px) {
    .container,
    .app-container {
        width: min(100%, calc(100% - 1rem));
    }

    .home-page {
        min-height: calc(100vh - 2rem);
    }

    .hero-copy,
    .app-container > header,
    .form-card,
    .table-card,
    .review-style .preview,
    .response-card,
    .task-form-section,
    .todo-section {
        box-shadow: 5px 5px 0 rgba(31, 49, 56, 0.75);
    }

    .home-hero h1,
    .app-container h1 {
        font-size: 2.5rem;
    }

    .card-heading h2,
    .preview h2,
    .responses h2,
    .todo-section h3 {
        font-size: 1.55rem;
    }

    th,
    td {
        padding: 0.8rem;
    }

    table {
        min-width: 28rem;
    }
}
