.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 {
    /* phone-case已处理safe-area-inset-top，这里只保留固定内边距 */
    padding: 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;
    }
}

/* 淘卖 · 抢票区 */
.taomai-ticket-hero {
    background: linear-gradient(160deg, rgba(245, 240, 255, 0.95), rgba(255, 255, 255, 0.9));
    border-color: rgba(124, 92, 180, 0.18);
}
.taomai-ticket-progress-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.taomai-ticket-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(110, 70, 170, 0.1);
    color: #5b3d8a;
}
.taomai-ticket-badge.practice {
    background: rgba(34, 139, 230, 0.12);
    color: #1a6cad;
}
.taomai-ticket-options .taomai-ticket-check {
    font-size: 12px;
    font-weight: 700;
    color: #3d3a52;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.taomai-ticket-session-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.taomai-ticket-card {
    border-color: rgba(107, 76, 154, 0.16);
    transition: opacity 0.2s ease;
}
.taomai-ticket-card.is-closed {
    opacity: 0.62;
}
.taomai-ticket-icon {
    font-size: 28px;
    line-height: 1;
}
.taomai-ticket-bar-outer {
    margin-top: 10px;
    height: 6px;
    border-radius: 999px;
    background: rgba(80, 60, 120, 0.1);
    overflow: hidden;
}
.taomai-ticket-bar-inner {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8b5cf6, #c084fc);
}
.taomai-ticket-countdown {
    font-size: 12px;
    font-weight: 800;
    color: #6b21a8;
}
.taomai-ticket-grab:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.taomai-ticket-custom-card {
    border-color: rgba(124, 92, 180, 0.2);
    background: rgba(255, 255, 255, 0.65);
}
.taomai-ticket-custom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
@media (max-width: 520px) {
    .taomai-ticket-custom-grid {
        grid-template-columns: 1fr;
    }
}

.taomai-ticket-modal-inner .taomai-ticket-detail-hero {
    text-align: center;
    padding: 8px 0;
}

.taomai-watch-modal-shell {
    position: relative;
    max-width: 400px;
    border: none;
    border-radius: 22px;
    overflow: hidden;
    padding: 0;
    background: transparent;
    box-shadow: 0 24px 60px rgba(76, 29, 149, 0.35);
}
.taomai-watch-modal-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg, #1e1b4b 0%, #4c1d95 42%, #7c3aed 100%);
    z-index: 0;
}
.taomai-watch-modal-shell > *:not(.taomai-watch-modal-bg) {
    position: relative;
    z-index: 1;
}
.taomai-watch-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.taomai-watch-modal-head {
    padding: 28px 22px 16px;
    text-align: center;
    color: #fff;
}
.taomai-watch-emoji {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}
.taomai-watch-title {
    margin: 12px 0 0;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 0.02em;
}
.taomai-watch-sub,
.taomai-watch-meta {
    margin: 8px 0 0;
    font-size: 12px;
    opacity: 0.88;
    line-height: 1.5;
}
.taomai-watch-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 16px 16px;
}
@media (max-width: 420px) {
    .taomai-watch-columns {
        grid-template-columns: 1fr;
    }
}
.taomai-watch-col {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px;
    color: #e9d5ff;
    font-size: 12px;
    line-height: 1.55;
}
.taomai-watch-col-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
    margin-bottom: 6px;
    color: #fcd34d;
}
.taomai-watch-col-role {
    background: rgba(255, 255, 255, 0.12);
}
.taomai-watch-rel {
    margin-top: 8px;
    font-size: 11px;
    opacity: 0.85;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}
.taomai-watch-actions {
    display: flex;
    gap: 10px;
    padding: 0 16px 22px;
    justify-content: stretch;
}
.taomai-watch-actions .taomai-btn {
    flex: 1;
}
.taomai-watch-primary {
    background: linear-gradient(90deg, #fcd34d, #fbbf24) !important;
    color: #1e1b4b !important;
    font-weight: 900 !important;
    border: none !important;
}

.taomai-ticket-start-banner .taomai-ticket-start-actions .taomai-btn {
    pointer-events: auto;
}

/* 观演对谈 · 上下分栏 */
#taomai-ticket-watch-modal .taomai-watch-live-modal {
    position: relative;
    max-width: 520px;
    width: calc(100vw - 24px);
    max-height: 92vh;
    margin: auto;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 40%, #f8fafc 40%);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
    padding: 0;
}
.taomai-watch-live-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    color: #fff;
    flex-shrink: 0;
}
.taomai-watch-live-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 900;
    min-width: 0;
}
.taomai-watch-live-ico {
    font-size: 20px;
    line-height: 1;
}
.taomai-watch-end-btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.taomai-watch-live-split {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: #f8fafc;
}
.taomai-watch-narration-pane {
    flex: 1;
    min-height: 36vh;
    max-height: 42vh;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.9), #fff);
}
.taomai-watch-chat-pane {
    flex: 1;
    min-height: 32vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}
.taomai-watch-pane-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6366f1;
    padding: 10px 14px 6px;
}
.taomai-watch-hint {
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
    font-size: 11px;
}
.taomai-watch-narration-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 14px 12px;
    font-size: 13px;
    line-height: 1.75;
    color: #334155;
}
.taomai-watch-narration-p {
    margin: 0 0 10px;
    text-indent: 0;
}
.taomai-watch-loading {
    color: #94a3b8;
    font-size: 13px;
    padding: 8px 0;
}
.taomai-watch-chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px 8px;
    min-height: 120px;
}
.taomai-watch-bubble-row {
    margin-bottom: 10px;
}
.taomai-watch-bubble-label {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 4px;
}
.taomai-watch-bubble-row--user .taomai-watch-bubble-label {
    color: #2563eb;
}
.taomai-watch-bubble-row--ai .taomai-watch-bubble-label {
    color: #7c3aed;
}
.taomai-watch-bubble {
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #1e293b;
    background: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, 0.25);
}
.taomai-watch-bubble-row--ai .taomai-watch-bubble {
    background: linear-gradient(135deg, rgba(250, 245, 255, 0.95), rgba(243, 232, 255, 0.9));
    border-color: rgba(167, 139, 250, 0.35);
}
.taomai-watch-compose {
    padding: 10px 12px 14px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.taomai-watch-textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    padding: 10px 12px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
}
.taomai-watch-compose-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    justify-content: flex-end;
}
.taomai-watch-compose-actions .taomai-btn {
    min-width: 72px;
}
.taomai-watch-gen-status {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #7c3aed;
    animation: taomai-pulse-opacity 1s ease-in-out infinite;
}
@keyframes taomai-pulse-opacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (min-width: 640px) {
    #taomai-ticket-watch-modal .taomai-watch-live-modal {
        max-width: 720px;
    }
    .taomai-watch-live-split {
        flex-direction: row;
    }
    .taomai-watch-narration-pane {
        min-height: 0;
        max-height: none;
        width: 50%;
        border-bottom: none;
        border-right: 1px solid rgba(99, 102, 241, 0.15);
    }
    .taomai-watch-chat-pane {
        width: 50%;
        min-height: 56vh;
    }
}
