:root {
    --ink: #17231d;
    --muted: #5d6f65;
    --line: #dbe4d2;
    --matcha: #6f9f45;
    --matcha-dark: #3f6f2f;
    --sun: #f3c35f;
    --cream: #fbfaf3;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(34, 55, 38, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--cream);
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 4vw, 64px);
    background: rgba(251, 250, 243, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--white);
    background: var(--matcha-dark);
    border-radius: 50%;
}

nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.94rem;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

.nav-cta {
    color: var(--matcha-dark);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    min-height: calc(100vh - 68px);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
    padding: clamp(46px, 7vw, 92px) clamp(18px, 6vw, 86px) 56px;
    background:
        linear-gradient(105deg, rgba(251, 250, 243, 0.98) 0%, rgba(251, 250, 243, 0.78) 48%, rgba(217, 230, 195, 0.25) 100%),
        url("https://images.unsplash.com/photo-1536256263959-770b48d82b0a?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--matcha-dark);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

h1 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(3rem, 7vw, 6.6rem);
    line-height: 0.95;
}

h2 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
}

h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.hero-text {
    max-width: 620px;
    color: #3a4b42;
    font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.hero-actions,
.composer-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    color: var(--white);
    background: var(--matcha-dark);
}

.button.secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
    border-color: var(--line);
}

.hero-panel {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: var(--shadow);
}

.live-card,
.order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.live-card span,
.mini-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.rating {
    display: grid;
    min-width: 52px;
    min-height: 52px;
    place-items: center;
    color: var(--white) !important;
    background: var(--matcha);
    border-radius: 50%;
    font-weight: 900;
}

.stat-badge {
    display: grid;
    min-width: 86px;
    min-height: 66px;
    place-items: center;
    padding: 10px 14px;
    color: var(--white);
    background: var(--matcha);
    border-radius: 8px;
    text-align: center;
}

.stat-badge strong {
    display: block;
    font-size: 1.55rem;
    line-height: 1;
}

.stat-badge small {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.78rem;
    font-weight: 850;
}

.cup-visual {
    display: grid;
    min-height: 310px;
    margin: 18px 0;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #e9f0dc, #fff9e8);
}

.cup-visual span {
    width: min(62%, 280px);
    aspect-ratio: 1;
    border: 24px solid #f9f8f0;
    border-radius: 50%;
    background: radial-gradient(circle at center, #b8d586 0 34%, #86ad55 35% 58%, #5f853c 59% 100%);
    box-shadow: inset 0 0 0 22px rgba(255, 255, 255, 0.38), 0 20px 42px rgba(55, 82, 46, 0.2);
}

.mini-grid,
.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mini-grid div,
.business-grid article,
.listing-card,
.feed-item,
.signup-card,
.post-composer {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.mini-grid div {
    padding: 14px;
}

.mini-grid strong {
    display: block;
    font-size: 1.35rem;
}

.account-strip,
.section {
    padding: clamp(42px, 7vw, 82px) clamp(18px, 6vw, 86px);
}

.account-strip {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: clamp(24px, 4vw, 54px);
    align-items: center;
    background: #f0f5e9;
}

.signup-card,
.post-composer {
    display: grid;
    gap: 14px;
    padding: 18px;
}

label {
    display: grid;
    gap: 7px;
    color: #34443b;
    font-weight: 800;
}

select,
input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    color: var(--ink);
    background: var(--white);
}

textarea {
    resize: vertical;
}

.form-message {
    min-height: 22px;
    margin: 0;
    color: var(--matcha-dark);
    font-weight: 800;
}

.flash-bar {
    position: sticky;
    top: 67px;
    z-index: 9;
    padding: 12px clamp(18px, 6vw, 86px);
    color: var(--white);
    background: var(--matcha-dark);
    font-weight: 850;
}

.flash-bar.error,
.flash.error {
    background: #9f3f3f;
}

.flash {
    padding: 12px;
    border-radius: 8px;
    color: var(--white);
    background: var(--matcha-dark);
    font-weight: 800;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.section-heading p:not(.eyebrow) {
    color: var(--muted);
    font-size: 1.08rem;
}

.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.tab,
.quantity button {
    min-width: 44px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    cursor: pointer;
    font-weight: 850;
}

.tab.active,
.quantity button:hover {
    color: var(--white);
    background: var(--matcha-dark);
}

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

.listing-card,
.feed-item {
    padding: 18px;
}

.listing-card {
    display: grid;
    min-height: 230px;
    align-content: space-between;
    gap: 18px;
}

.listing-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--matcha-dark);
    background: #e9f2df;
    font-size: 0.78rem;
    font-weight: 900;
}

.stars {
    color: #a56b0d;
    font-weight: 900;
}

.split {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(28px, 5vw, 72px);
    background: #fffdf4;
}

.feed-list {
    display: grid;
    gap: 14px;
}

.feed-item p {
    color: var(--muted);
}

.feed-item footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--matcha-dark);
    font-size: 0.9rem;
    font-weight: 850;
}

.business-band {
    background: #edf3e5;
}

.business-grid article {
    padding: 22px;
}

.dashboard-band {
    background: #fffdf4;
}

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

.tool-card,
.stack-form {
    display: grid;
    gap: 13px;
}

.tool-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.map-shell {
    width: 100%;
    min-height: min(72vh, 680px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #dce8d0;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.leaflet-popup-content {
    display: grid;
    gap: 6px;
    min-width: 190px;
}

.leaflet-popup-content span,
.leaflet-popup-content small,
.muted {
    color: var(--muted);
}

.popup-photo {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
}

.card-photo,
.feed-photo {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.card-photo {
    height: 190px;
}

.feed-photo {
    max-height: 340px;
}

.compact-form {
    display: grid;
    grid-template-columns: 0.7fr 1fr auto;
    gap: 8px;
}

.auth-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: min(1120px, 100%);
}

.order-section {
    background: #fbfaf3;
}

.order-card {
    max-width: 880px;
}

.quantity {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

body > footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 24px clamp(18px, 6vw, 86px);
    color: var(--muted);
    border-top: 1px solid var(--line);
}

body > footer a {
    font-weight: 850;
    text-decoration: none;
}

.status-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: #f0f5e9;
}

.status-card {
    width: min(680px, 100%);
    padding: clamp(26px, 5vw, 46px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.status-card form {
    margin-top: 14px;
}

.status-card h1 {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
}

.status-detail {
    color: var(--muted);
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .topbar,
    body > footer {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        flex-wrap: wrap;
    }

    .hero,
    .account-strip,
    .split {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .card-grid,
    .tool-grid,
    .auth-layout,
    .business-grid {
        grid-template-columns: 1fr;
    }

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

    .compact-form,
    .two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    h1 {
        font-size: 3rem;
    }

    .mini-grid {
        grid-template-columns: 1fr;
    }
}
