:root {
    --sky: #3AA6DE;
    --sun: #FFC93C;
    --coral: #FF6B57;
    --pup-pink: #FF8FAB;
    --cream: #FFFBF2;
    --ink: #1F2A44;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: 'Nunito Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, .ht-brand {
    font-family: 'Baloo 2', sans-serif;
}

.ht-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(16px, 5vw, 56px);
    background: var(--sky);
    flex-shrink: 0;
    position: relative;
}

.ht-brand {
    font-weight: 700;
    font-size: 22px;
    color: var(--sun);
    text-decoration: none;
}

.ht-navlinks { display: flex; gap: 24px; }
.ht-navlinks a { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }

.ht-nav-right { display: flex; align-items: center; gap: 12px; }

.ht-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.ht-navcta {
    background: var(--coral);
    color: #fff;
    padding: 10px 20px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.ht-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    width: 100%;
    flex: 1 0 auto;
}
.ht-main-wide { max-width: 1080px; }

.ht-footer {
    display: flex;
    justify-content: space-between;
    padding: 20px clamp(16px, 5vw, 56px);
    font-size: 13px;
    background: var(--sky);
    color: #fff;
    flex-shrink: 0;
}
.ht-version { color: #DCF0FC; }

form.ht-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }

.ht-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 560px) {
    .ht-form-row { grid-template-columns: 1fr; }
}
.ht-plan-row { grid-template-columns: 1fr 1fr 1fr; align-items: stretch; }
@media (max-width: 560px) {
    .ht-plan-row { grid-template-columns: 1fr; }
}

.ht-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #5b6a8a;
    margin-bottom: 5px;
}

.ht-form input[type="text"],
.ht-form input[type="email"],
.ht-form input[type="password"],
.ht-form input[type="file"],
.ht-form select,
.ht-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d2bf;
    border-radius: 10px;
    font-size: 14.5px;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
}

.ht-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235b6a8a'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 32px;
    cursor: pointer;
}

.ht-form input:focus,
.ht-form select:focus,
.ht-form textarea:focus {
    outline: 2px solid var(--sky);
    outline-offset: 1px;
    border-color: var(--sky);
}

.ht-form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 14.5px;
    color: var(--ink);
}

.ht-btn {
    background: var(--sky);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.ht-btn:hover { opacity: 0.92; }

.ht-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}

.ht-alert-error { background: #fde2df; color: #9b2f22; }
.ht-alert-success { background: #e3f4e7; color: #24623b; }
.ht-alert-info { background: #e6f1fb; color: #17456e; }

.ht-navlinks-signout { display: none; }

@media (max-width: 600px) {
    .ht-nav-toggle { display: flex; }
    .ht-nav-right .ht-navcta-signout { display: none; }
    .ht-navlinks {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--sky);
        padding: 4px clamp(16px, 5vw, 56px) 12px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        z-index: 40;
    }
    .ht-navlinks.open { display: flex; }
    .ht-navlinks a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }
    .ht-navlinks a:last-child { border-bottom: none; }
    .ht-navlinks-signout {
        display: block;
        font-weight: 700;
        color: var(--sun);
    }
    .ht-list-header { flex-direction: column; align-items: stretch; gap: 12px; }
}

.ht-breakout {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
}

.ht-hero {
    text-align: center;
    padding: 70px 20px 40px;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}

.ht-page-paws-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 700px;
    max-height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.ht-page-paws-wrap svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ht-hero-content { position: relative; z-index: 1; }

.ht-stamp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFF3D6;
    color: #B4790A;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 26px;
}

.ht-hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    margin: 0;
}

.ht-hero h1 span { color: var(--sky); }

.ht-hero .ht-sub {
    margin: 22px auto 0;
    font-size: 18px;
    line-height: 1.6;
    max-width: 520px;
    color: #3f4a5f;
}

.ht-hero-actions {
    margin-top: 34px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.ht-btn-secondary {
    color: var(--ink);
    padding: 13px 26px;
    border-radius: 28px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #E6E0D0;
}

.ht-wag-divider { display: block; width: 100%; height: 60px; }

.ht-feature-strip {
    background: var(--sky);
    padding: 44px 20px 50px;
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.ht-feature-item { text-align: center; color: #fff; max-width: 220px; }
.ht-feature-item svg { margin-bottom: 10px; }
.ht-feature-item .t { font-family: 'Baloo 2', sans-serif; font-size: 16px; margin-bottom: 4px; }
.ht-feature-item .d { font-size: 13px; color: #DCF0FC; }

.ht-disclaimer { font-size: 13px; color: #6b7280; text-align: center; padding: 24px 20px 0; }

.ht-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 760px) {
    .ht-tools-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .ht-tools-grid { grid-template-columns: 1fr; }
}
.ht-tool-card {
    background: #fff;
    border: 1px solid #eee1c9;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.ht-tool-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f7f3e6;
}
.ht-tool-photo-placeholder { display: flex; align-items: center; justify-content: center; }
.ht-tool-name { font-weight: 700; font-size: 13.5px; margin-bottom: 3px; }
.ht-tool-price { font-weight: 700; font-size: 13px; color: var(--ink); margin-bottom: 3px; }
.ht-tool-price-date { font-weight: 400; font-size: 10.5px; color: #9ca3af; }
.ht-tool-desc { color: #6b7280; font-size: 12px; margin-bottom: 10px; flex: 1; }
.ht-tool-buy { margin-top: auto; padding: 7px 12px; font-size: 12.5px; text-align: center; text-decoration: none; }

.ht-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 900px) {
    .ht-dashboard-grid { grid-template-columns: 1fr; }
}

.ht-neighborhood-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.ht-neighborhood-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.1s ease;
}
.ht-neighborhood-tile:hover { transform: scale(1.02); }
.ht-neighborhood-tile img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 6px;
    box-sizing: border-box;
}
.ht-neighborhood-name { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.ht-neighborhood-age { font-size: 12px; color: #6b7280; }

.ht-plan-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid #eee1c9;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    position: relative;
}
.ht-plan-option input[type="radio"] { position: absolute; top: 12px; right: 12px; }
.ht-plan-option strong { font-size: 15px; }
.ht-plan-option span { color: #6b7280; font-size: 12.5px; }
.ht-plan-option-selected { border-color: var(--sky); background: #eef7fc; }
.ht-plan-option-disabled { cursor: default; opacity: 0.55; }

.ht-grocery-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ht-grocery-list { list-style: none; padding: 0; margin: 0; }
.ht-grocery-list li { border-bottom: 1px solid #f0ead6; padding: 4px 0; }
.ht-grocery-list li:last-child { border-bottom: none; }
.ht-grocery-list label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 4px; }
.ht-grocery-list input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; }
.ht-grocery-list label span:nth-child(2) { flex: 1; font-size: 15px; }
.ht-grocery-list input[type="checkbox"]:checked + span,
.ht-grocery-list input[type="checkbox"]:checked ~ .ht-grocery-amount {
    text-decoration: line-through;
    color: #9ca3af;
}
.ht-grocery-amount { font-weight: 600; font-size: 14px; }
.ht-grocery-note { font-size: 12px; color: #9ca3af; margin: 10px 0 0; }
.ht-calc-raw { font-weight: 400; color: #5b6a8a; font-size: 12.5px; }

@media print {
    body.ht-print-grocery-active .ht-nav,
    body.ht-print-grocery-active .ht-footer,
    body.ht-print-grocery-active .ht-recipe-layout,
    body.ht-print-grocery-active > .ht-main > p,
    body.ht-print-grocery-active > .ht-main > h1,
    body.ht-print-grocery-active .ht-disclaimer {
        display: none !important;
    }
    body.ht-print-grocery-active .ht-grocery-header button { display: none !important; }
    body.ht-print-grocery-active #grocery-list-section { border: none !important; padding: 0 !important; }
}

.ht-nutrition-label {
    width: 100%;
    max-width: 420px;
    border-collapse: collapse;
    border: 2px solid var(--ink);
    font-size: 14.5px;
}
.ht-nutrition-label td {
    padding: 7px 10px;
    border-bottom: 1px solid #d9d2bf;
}
.ht-nutrition-label td:last-child { text-align: right; font-weight: 600; }
.ht-nutrition-label tr:last-child td { border-bottom: none; }
.ht-nutrition-calories td {
    font-size: 20px;
    font-weight: 700;
    border-bottom: 4px solid var(--ink);
    padding: 10px;
}
.ht-nutrition-section td {
    background: #f7f3e6;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5b6a8a;
    padding: 6px 10px;
}
.ht-nutrition-ratio td { background: #fbf7ec; font-style: italic; }

.ht-btn-disabled {
    background: #eee1c9;
    color: #9ca3af;
    cursor: default;
}

.ht-pricing-table-wrap { overflow-x: auto; padding-top: 16px; }
.ht-pricing-table {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-collapse: collapse;
    min-width: 640px;
}
.ht-pricing-table th {
    padding: 14px 12px 16px;
    vertical-align: top;
    text-align: center;
    border-bottom: 2px solid #eee1c9;
    position: relative;
}
.ht-pricing-col-feature { width: 32%; }
.ht-pricing-th-featured { background: #eef7fc; border-radius: 10px 10px 0 0; position: relative; }
.ht-pricing-badge {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sky);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 12px;
    border-radius: 10px;
    white-space: nowrap;
}
.ht-pricing-th-name { font-family: 'Baloo 2', sans-serif; font-size: 19px; font-weight: 700; color: var(--ink); margin-top: 14px; }
.ht-pricing-th-price { font-size: 22px; font-weight: 700; color: var(--ink); margin: 4px 0 0; }
.ht-pricing-th-price span { font-size: 13px; font-weight: 600; color: #6b7280; }
.ht-pricing-th-annual { font-size: 12px; color: #6b7280; margin-bottom: 10px; }
.ht-pricing-group-row td {
    padding: 14px 12px 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5b6a8a;
}
.ht-pricing-feature-label { padding: 8px 12px; font-size: 13.5px; border-bottom: 1px solid #f5f0e0; }
.ht-pricing-cell { text-align: center; border-bottom: 1px solid #f5f0e0; }
.ht-pricing-cell-value { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.ht-pricing-paw-yes { color: var(--coral); display: inline-flex; }
.ht-pricing-paw-no { color: #e5ded0; display: inline-flex; }

.ht-aafco-report {
    border-radius: 10px;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 13px;
}
.ht-aafco-ok { background: #e3f4e7; }
.ht-aafco-warn { background: #fdf0e0; }
.ht-aafco-pending { background: #f3f0e6; color: #6b7280; }
.ht-aafco-heading { font-size: 13px; margin-bottom: 4px; }
.ht-aafco-health-caveat { background: #fde2df; color: #9b2f22; padding: 8px 10px; border-radius: 6px; margin: 6px 0; font-size: 12.5px; }
.ht-aafco-summary { margin: 4px 0; }
.ht-aafco-best-pick {
    background: #fff;
    border: 1px solid #f0c987;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    margin: 8px 0;
}
.ht-aafco-dose { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #eee1c9; color: #5b6a8a; }
.ht-aafco-list { margin: 6px 0 0; padding-left: 18px; }
.ht-aafco-list li { margin-bottom: 8px; }
.ht-aafco-suggestion { color: #5b6a8a; font-size: 12.5px; margin-top: 2px; }
.ht-aafco-addressed {
    background: #f0f9f1;
    border: 1px solid #bfe3c4;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 12px;
}
.ht-aafco-addressed .ht-aafco-list li { color: #24623b; margin-bottom: 4px; }
.ht-aafco-disclaimer { color: #9ca3af; font-size: 11px; margin: 10px 0 0; line-height: 1.5; }

/* Compact list rows with icon actions, used for dogs/recipes/ingredients */
.ht-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ht-row-link { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; }
.ht-row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ht-row-icon-btn {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee1c9;
    border-radius: 6px;
    background: #fff;
    color: #5b6a8a;
    cursor: pointer;
}
.ht-row-icon-btn:hover { background: #f7f3e6; }
.ht-row-icon-btn.danger { color: #9b2f22; }
.ht-row-icon-btn.danger:hover { background: #fde2df; }

/* Native <dialog> modal styling */
.ht-modal {
    border: none;
    border-radius: 14px;
    padding: 24px;
    max-width: 480px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.ht-modal::backdrop { background: rgba(31, 42, 68, 0.45); }
.ht-modal h2 { margin-top: 0; }
.ht-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--ink);
    padding: 0;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ht-admin-category {
    border: 1px solid #eee1c9;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.ht-admin-category > summary {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    background: #f7f3e6;
    color: var(--ink);
}
.ht-admin-category > summary::-webkit-details-marker { display: none; }
.ht-admin-category-body { padding: 10px 14px 14px; }

.ht-admin-subcat-count { color: #9ca3af; font-weight: 400; font-size: 12px; }

.ht-admin-search-results { background: #fbf7ec; border: 1px solid #eee1c9; border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.ht-admin-search-hit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed #eee1c9;
}
.ht-admin-search-hit:last-of-type { border-bottom: none; }
.ht-admin-search-hit-desc { font-size: 13px; }
.ht-admin-search-hit-type { color: #9ca3af; font-size: 11px; }

.ht-manual-nutrient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px 14px;
}
.ht-manual-nutrient-grid label { display: block; font-size: 11.5px; font-weight: 600; margin-bottom: 2px; }
.ht-manual-nutrient-grid label span { font-weight: 400; color: #9ca3af; }
.ht-manual-nutrient-grid input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d9d2bf;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
}
.ht-admin-prep-badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; letter-spacing: 0.03em; }
.ht-admin-prep-raw { background: #fde2df; color: #9b2f22; }
.ht-admin-prep-cooked { background: #e3f4e7; color: #24623b; }
.ht-admin-suspicious { color: #b4790a; font-weight: 600; }

/* ---- Recipe editor ---- */
.ht-recipe-title-input {
    font-family: 'Baloo 2', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 6px;
    width: 100%;
    margin-bottom: 10px;
}
.ht-recipe-title-input:focus { border-color: #d9d2bf; background: #fff; border-radius: 8px; outline: none; }

.ht-recipe-section-label {
    font-size: 12px;
    font-weight: 700;
    color: #5b6a8a;
    margin: 12px 0 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ht-supplement-note { font-size: 12px; color: #6b7280; margin: -2px 0 8px; }

.ht-link-btn {
    background: none;
    border: none;
    color: var(--coral);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.ht-ingredient-row {
    display: grid;
    grid-template-columns: 1fr 96px auto;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
}
.ht-protein-row { grid-template-columns: 1fr 96px; }
.ht-ingredient-name { font-size: 14.5px; font-weight: 600; }

.ht-row-flash { animation: ht-row-flash-anim 1.5s ease-out; border-radius: 8px; }
@keyframes ht-row-flash-anim {
    0% { background: #fde68a; }
    100% { background: transparent; }
}

.ht-percent-wrap { position: relative; display: flex; align-items: center; }
.ht-percent-input {
    width: 100%;
    padding: 8px 24px 8px 10px;
    border: 1px solid #d9d2bf;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    text-align: right;
}
.ht-percent-sign { position: absolute; right: 9px; font-size: 12px; color: #9ca3af; pointer-events: none; }

.ht-select {
    width: 100%;
    padding: 8px 30px 8px 10px;
    border: 1px solid #d9d2bf;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background-color: #fff;
    color: var(--ink);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235b6a8a'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.ht-icon-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid #d9d2bf;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink);
}
.ht-icon-btn:hover { background: #f7f3e6; }
.ht-icon-btn.danger { color: #9b2f22; }

.ht-empty-note { font-size: 13px; color: #9ca3af; padding: 6px 0; }
.ht-add-ingredient-row { margin-top: 8px; max-width: 280px; }

.ht-total-badge {
    margin-top: 16px;
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
}
.ht-total-badge.ok { background: #E4F3EA; color: #24623b; }
.ht-total-badge.warn { background: #FBE4DF; color: #9b2f22; }

.ht-calc-input-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ht-calc-input-row label { font-size: 14px; font-weight: 600; }
.ht-calc-input {
    width: 120px;
    text-align: right;
    padding: 8px 10px;
    border: 1px solid #d9d2bf;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
}

.ht-calc-warning { color: #9b2f22; font-size: 12.5px; margin-top: 8px; }
.ht-calc-placeholder { color: #9ca3af; font-size: 13.5px; margin-top: 10px; font-style: italic; }

.ht-calc-results { margin-top: 14px; border-top: 1px solid #eee1c9; padding-top: 10px; }
.ht-calc-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px dashed #f3ecd8;
}
.ht-calc-row:last-child { border-bottom: none; }
.ht-calc-value { font-weight: 700; text-align: right; }
.ht-calc-total { font-weight: 700; border-bottom: 1px solid #eee1c9; margin-bottom: 4px; }
.ht-calc-total .ht-calc-value { font-size: 15.5px; color: var(--sky); }

@media (max-width: 480px) {
    .ht-ingredient-row, .ht-protein-row { grid-template-columns: 1fr; row-gap: 6px; }
}

.ht-card {
    background: #fff;
    border: 1px solid #eee1c9;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.ht-card h2:first-child { margin-top: 0; }

.ht-recipe-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 16px;
    align-items: start;
}

.ht-recipe-nutrition-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 800px) {
    .ht-recipe-nutrition-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .ht-recipe-layout { grid-template-columns: 1fr; }
}

.ht-dog-list { list-style: none; margin: 0; padding: 0; }
.ht-dog-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #eee1c9;
}
.ht-dog-list-item:last-child { border-bottom: none; }

.ht-dog-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    background: var(--sky);
    box-sizing: border-box;
}
.ht-dog-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ht-dog-thumb-preview { width: 96px; height: 96px; margin-bottom: 8px; }
.ht-dog-thumb-large { width: 72px; height: 72px; }

.ht-crop-preview-wrap { margin-top: 10px; }
.ht-crop-preview-img { max-width: 280px; max-height: 280px; display: block; border-radius: 8px; cursor: crosshair; user-select: none; touch-action: none; }
.ht-crop-box { position: absolute; border: 2px dashed var(--coral); pointer-events: none; box-sizing: border-box; }
.ht-crop-box-square { position: absolute; border: 2px dashed var(--sky); pointer-events: none; box-sizing: border-box; }
.ht-crop-marker {
    position: absolute;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--ink);
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.ht-crop-legend { display: flex; gap: 14px; font-size: 11.5px; color: #6b7280; margin-top: 6px; align-items: center; }
.ht-crop-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ht-crop-legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ht-crop-hint { font-size: 11.5px; color: #6b7280; margin: 4px 0 0; }

.ht-dog-info { display: flex; flex-direction: column; }
.ht-dog-name { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 16px; }
.ht-dog-name:hover { text-decoration: underline; }
.ht-dog-meta { color: #6b7280; font-size: 14px; }

.ht-dog-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.ht-datepicker { position: relative; display: block; max-width: 260px; }
.ht-datepicker-row { display: flex; gap: 8px; }
.ht-datepicker-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d9d2bf;
    border-radius: 10px;
    font-size: 14.5px;
    font-family: inherit;
}
.ht-datepicker-toggle {
    flex-shrink: 0;
    width: 40px;
    border: 1px solid #d9d2bf;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ht-datepicker-toggle:hover { background: #f7f3e6; }

.ht-cal-popup {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid #d9d2bf;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(31, 42, 68, 0.18);
    padding: 12px;
    width: 260px;
}
.ht-datepicker.open .ht-cal-popup { display: block; }

.ht-cal-header { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.ht-cal-nav {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--ink);
    font-size: 15px;
    cursor: pointer;
    border-radius: 6px;
}
.ht-cal-nav:hover { background: #f0ead6; }
.ht-cal-title { flex: 1; text-align: center; font-weight: 700; font-size: 13.5px; font-family: 'Baloo 2', sans-serif; }
.ht-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 4px;
}
.ht-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ht-cal-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: var(--ink);
    cursor: pointer;
}
.ht-cal-cell:hover:not(.ht-cal-empty) { background: #f0ead6; }
.ht-cal-cell.selected { background: var(--sky); color: #fff; font-weight: 700; }
.ht-cal-empty { cursor: default; }
.ht-cal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee1c9;
}
.ht-cal-footer button {
    background: none;
    border: none;
    color: var(--coral);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

