.taomai-root {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(130% 90% at 0% 0%, rgba(245, 247, 255, 0.85), transparent 48%),
        radial-gradient(120% 90% at 100% 0%, rgba(241, 246, 255, 0.75), transparent 50%),
        linear-gradient(180deg, #f7f8fc 0%, #f3f5fb 100%);
    color: #1f2430;
}

.taomai-header {
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.taomai-back-btn {
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 18px rgba(18, 24, 38, 0.08);
    cursor: pointer;
    color: #202532;
    font-size: 20px;
}

.taomai-title {
    font-size: 20px;
    font-weight: 800;
}

.taomai-tabs {
    margin: 6px 12px 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
}

.taomai-tab {
    border: none;
    border-radius: 999px;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.72);
    color: #4a5262;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.taomai-tab.active {
    background: #1f2532;
    color: #fff;
}

.taomai-main {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.taomai-card {
    border-radius: 16px;
    border: 1px solid rgba(27, 39, 63, 0.09);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 24px rgba(18, 24, 38, 0.06);
    padding: 12px;
}

.taomai-row { display: flex; gap: 8px; align-items: center; }
.taomai-row.wrap { flex-wrap: wrap; }
.taomai-grow { flex: 1; min-width: 0; }
.taomai-muted { color: #6b7385; font-size: 12px; }

.taomai-input, .taomai-select {
    width: 100%;
    border: 1px solid rgba(27, 39, 63, 0.14);
    border-radius: 12px;
    background: #fff;
    padding: 9px 10px;
    font-size: 13px;
    color: #1f2430;
}

.taomai-btn {
    border: none;
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    background: #212937;
    color: #fff;
}

.taomai-btn.ghost {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3443;
    border: 1px solid rgba(27, 39, 63, 0.14);
}

.taomai-btn.warn {
    background: #ff5f6d;
}

.taomai-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(27, 39, 63, 0.12);
    font-size: 12px;
    font-weight: 700;
    color: #2f384a;
    cursor: pointer;
}

.taomai-chip.active {
    background: #202835;
    color: #fff;
    border-color: #202835;
}

.taomai-product-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.taomai-product {
    border-radius: 14px;
    border: 1px solid rgba(27, 39, 63, 0.12);
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 170px;
}

.taomai-product-title {
    font-size: 14px;
    font-weight: 800;
    color: #1f2430;
}

.taomai-price {
    font-size: 15px;
    font-weight: 900;
    color: #202937;
}

.taomai-section-title {
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 900;
    color: #4d5667;
}

.taomai-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.taomai-order-item, .taomai-cart-item {
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(27, 39, 63, 0.1);
    background: rgba(255, 255, 255, 0.94);
}

.taomai-empty {
    border-radius: 12px;
    padding: 18px 12px;
    text-align: center;
    color: #7e8595;
    background: rgba(255, 255, 255, 0.78);
    border: 1px dashed rgba(27, 39, 63, 0.16);
}

/* Takeout zone: warm palette, scoped to avoid shop regression */
.taomai-takeout-card {
    border: 1px solid rgba(255, 138, 73, 0.26);
    background: linear-gradient(180deg, rgba(255, 247, 240, 0.98), rgba(255, 242, 233, 0.96));
    box-shadow: 0 12px 24px rgba(191, 92, 35, 0.1);
}

.taomai-takeout-product,
.taomai-takeout-item {
    border-color: rgba(255, 138, 73, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 249, 244, 0.98));
}

.taomai-takeout-btn {
    background: linear-gradient(135deg, #ff8c42, #ff6f3c);
    color: #fff;
}

.taomai-takeout-btn.ghost {
    background: rgba(255, 255, 255, 0.86);
    color: #9a3e1f;
    border: 1px solid rgba(255, 138, 73, 0.34);
}

.taomai-takeout-chip {
    border: 1px solid rgba(255, 138, 73, 0.3);
    background: rgba(255, 250, 245, 0.9);
    color: #8f3a1a;
}

.taomai-takeout-chip.active {
    background: linear-gradient(135deg, #ff8c42, #ff6f3c);
    color: #fff;
    border-color: transparent;
}

.taomai-takeout-input,
.taomai-takeout-select {
    border: 1px solid rgba(255, 138, 73, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

/* Storage zone: flea-market notebook style */
.taomai-storage-card {
    border: 1px solid rgba(153, 112, 63, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(252, 246, 235, 0.98));
    box-shadow: 0 12px 24px rgba(122, 87, 48, 0.1);
}

.taomai-storage-item,
.taomai-storage-order {
    border-color: rgba(153, 112, 63, 0.26);
    background: rgba(255, 254, 250, 0.95);
}

.taomai-storage-btn {
    background: linear-gradient(135deg, #c38a4a, #a86d31);
    color: #fff;
}

.taomai-storage-btn.ghost {
    background: rgba(255, 255, 255, 0.85);
    color: #895624;
    border: 1px dashed rgba(153, 112, 63, 0.45);
}

.taomai-storage-chip {
    border: 1px dashed rgba(153, 112, 63, 0.45);
    background: rgba(255, 251, 242, 0.95);
    color: #7d4d20;
}

.taomai-storage-input,
.taomai-storage-select {
    border: 1px solid rgba(153, 112, 63, 0.36);
    background: rgba(255, 255, 255, 0.92);
}

.taomai-storage-draft-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 8px;
}

.taomai-storage-market {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.taomai-storage-item {
    border-radius: 14px;
    border: 1px dashed rgba(153, 112, 63, 0.34);
    padding: 10px;
    transform: rotate(-0.25deg);
}

.taomai-storage-stamp {
    font-size: 11px;
    font-weight: 900;
    color: #8b4d19;
    border: 1px solid rgba(173, 82, 40, 0.45);
    background: rgba(255, 237, 221, 0.82);
    border-radius: 999px;
    padding: 5px 9px;
}

.taomai-storage-offer {
    margin-top: 8px;
    border-radius: 10px;
    border: 1px solid rgba(153, 112, 63, 0.25);
    background: rgba(255, 248, 236, 0.95);
    font-size: 12px;
    color: #6f4420;
    line-height: 1.45;
    padding: 8px;
}

.taomai-storage-kpis {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.taomai-storage-kpi {
    border-radius: 12px;
    border: 1px dashed rgba(153, 112, 63, 0.3);
    background: rgba(255, 255, 255, 0.72);
    padding: 8px 10px;
}

.taomai-storage-kpi .k {
    font-size: 11px;
    color: #8b6337;
    font-weight: 700;
}

.taomai-storage-kpi .v {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 900;
    color: #6f421d;
}

.taomai-storage-advice-item {
    border-radius: 10px;
    border: 1px solid rgba(153, 112, 63, 0.2);
    background: rgba(255, 252, 246, 0.95);
    color: #6e4521;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 420px) {
    .taomai-storage-draft-grid {
        grid-template-columns: 1fr 1fr;
    }
}
