:root {
    --ink: #291a15;
    --muted: #65534a;
    --coral: #b83d06;
    --line: #f1d9c8;
    --bg: #fffaf5;
    --td-orange: #c13d05;
    --td-gradient: linear-gradient(155deg, #e47800, #c53b00 78%);
    --td-surface: #fffdf9;
    --td-shadow: 0 10px 22px -14px #b34a2160, 0 2px 5px #9d4b1710;
}

[hidden] { display: none !important; }
.td-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.top { background: #fffefa; box-shadow: 0 6px 24px -18px #96370080; }
.nav-inner { justify-content: space-between; }
.td-brand-icon {
    background: radial-gradient(circle at 28% 20%, #ffe491, transparent 44%), linear-gradient(150deg, #ffbc30, #f07905);
    box-shadow: inset 0 1px 3px #fff9, 0 5px 12px -4px #b7562c64;
}
.td-wordmark strong, .foot .td-wordmark strong { color: var(--td-orange); }
.td-wordmark small { color: #6e5850; }
.nav-inner > .account, .nav-inner > .btn { margin-left: 0; }
.td-sign-in { gap: 7px; white-space: nowrap; }
.td-sign-in svg { width: 18px; height: 18px; }
.btn.primary, #wp-submit { background: var(--td-gradient); box-shadow: var(--td-shadow); }
.btn.primary:hover, #wp-submit:hover { background: linear-gradient(145deg, #ce6200, #a93100); }
.btn.primary:disabled { background: #e6dfd8; color: #66564d; box-shadow: none; }
.nav-inner .td-sign-in, .td-link-field [data-paste] { border-radius: 999px; }
.td-nav-menu { display: none; }
.td-desktop-lang .td-lang { margin: 0; }

.td-hero, .td-view-orders, .td-view-wallet {
    background:
        radial-gradient(ellipse at 98% 17%, #ffd5ab90, transparent 37%),
        radial-gradient(ellipse at 5% 98%, #ffc07577, transparent 40%),
        linear-gradient(160deg, #fffaf6, #fff2e5 72%, #fff7ed);
}
.td-home-layout {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    grid-template-rows: 1fr auto 1fr;
    column-gap: clamp(18px, 6vw, 76px);
    row-gap: 18px;
    padding-block: clamp(42px, 7vw, 76px) clamp(44px, 6vw, 72px);
}
.td-home-copy { grid-column: 1; grid-row: 1; align-self: end; }
.td-home-copy .eyebrow { background: #ffedd9; color: #813515; border: 1px solid #f5d6b7; }
.td-home-copy .eyebrow svg { color: var(--td-orange); }
.td-hero h1 { margin: 16px 0; font-size: clamp(1.8rem, 4.35vw, 3.6rem); }
.td-hero h1 em {
    display: inline-block;
    position: relative;
    font-size: 1.08em;
    font-style: italic;
    background-image: linear-gradient(100deg, #bd3500, #cf4e00 62%, #a55100);
}
.td-hero h1 em::after {
    content: "";
    position: absolute;
    width: 55%;
    height: .1em;
    left: 13%;
    bottom: -.18em;
    transform: rotate(-2deg);
    border-radius: 100% 75% 65% 60%;
    background: linear-gradient(100deg, #d54b09, #ffb64a);
}
.td-home-copy > p { margin: 22px 0 0; max-width: 500px; font-size: clamp(.95rem, 1.7vw, 1.08rem); }
.td-home-form { grid-column: 1; grid-row: 2; width: 100%; }
.td-home-form .td-link-form > label { font-size: .97rem; font-weight: 750; }
.td-link-field { border-color: #edcdb6; border-radius: 15px; box-shadow: var(--td-shadow); }
.td-link-field:focus-within { border-color: #cf6b30; outline-color: #ffe1c5; }
.td-link-field > span { color: var(--td-orange); }
.td-link-field [data-paste] { gap: 8px; min-width: 86px; }
.td-link-field [data-paste] svg { width: 17px; height: 17px; }
.td-home-art, .td-dashboard-mascot {
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}
.td-home-art {
    position: absolute;
    z-index: -1;
    top: 17px;
    right: 3%;
    width: min(26%, 265px);
    aspect-ratio: 372 / 408;
    background-image: url("mascot-home.webp");
    clip-path: polygon(27% 0, 100% 0, 100% 100%, 9% 100%, 15% 76%, 12% 59%, 0 63%, 0 43%, 27% 40%);
}
.td-example {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    position: relative;
    margin: clamp(115px, 16vw, 175px) 0 0;
    padding: clamp(10px, 1.5vw, 17px);
    border: 1px solid #fff9;
    border-radius: 26px;
    background: linear-gradient(140deg, #fff9ef, #ffe3ca);
    box-shadow: 0 20px 45px -32px #b8480f98, inset 0 1px 8px #fffc;
}
.td-example-platforms, .td-example-title, .td-example-total, .td-example-earn, .td-example-payout { display: flex; align-items: center; }
.td-example-platforms { gap: 10px; margin-bottom: 10px; }
.td-example-platforms > div { display: flex; flex: 1 1 0; min-width: 0; align-items: center; gap: 9px; font-size: .91rem; }
.td-example-platforms strong, .td-example small, .td-example-earn strong, .td-example-payout strong { display: block; }
.td-example small { font-size: .76rem; }
.td-example-receipt { padding: clamp(12px, 2vw, 22px); border: 1px solid #fff; border-radius: 20px; background: var(--td-surface); }
.td-example-title, .td-example-earn { gap: 10px; }
.td-example-title > div, .td-example-earn > div { min-width: 0; flex: 1; }
.td-example-badge { padding: 3px 9px; border-radius: 16px; background: #dcf6df; color: #166433; white-space: nowrap; font-size: .75rem; font-weight: 700; }
.td-example-total { justify-content: space-between; gap: 8px; padding-block: 12px; margin-block: 9px; border-block: 1px solid #f4e5db; font-size: .83rem; }
.td-example-total strong { color: var(--ink); font-size: 1.05rem; }
.td-example-earn { padding: 9px; border-radius: 15px; background: #ffecd6; color: var(--td-orange); }
.td-example-earn strong { font-size: clamp(1.05rem, 2.5vw, 1.45rem); white-space: nowrap; }
.td-example-earn b { border: 1px solid #eac398; border-radius: 9px; padding: 4px 8px; font-size: .85rem; }
.td-example-payout { width: max-content; max-width: 100%; margin: 14px auto 0; gap: 10px; padding: 7px 16px 7px 8px; border: 1px solid #fff; border-radius: 999px; background: #fffaf4; box-shadow: var(--td-shadow); }
.td-example-payout .td-feature-icon { background: #f1e8ff; color: #713bb7; border-radius: 50%; }
.td-feature-icon, .td-platform-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
}
.td-feature-icon { background: #ffecd8; color: var(--td-orange); }
.td-feature-icon svg, .td-platform-icon svg { width: 24px; height: 24px; }
.td-example-earn .td-feature-icon { color: white; background: var(--td-gradient); }
.td-platform-icon.shopee { color: #fff; background: linear-gradient(148deg, #f58232, #c33803); }
.td-platform-icon.tiktok { color: #fff; background: #15121a; }
.td-platform-icon.tiktok svg { filter: drop-shadow(-1px -1px 0 #24d5cd) drop-shadow(1px 1px 0 #f13362); }

:is(.td-view-orders, .td-view-wallet) .section { max-width: 850px; }
.td-dashboard-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, 28%); align-items: center; margin-bottom: clamp(17px, 3vw, 28px); }
.td-dashboard-heading h1 { display: flex; gap: 9px; align-items: center; margin-bottom: 8px; font-size: clamp(1.35rem, 4.7vw, 2.65rem); }
.td-dashboard-heading h1 svg { width: 1.05em; height: 1.05em; color: var(--td-orange); }
.td-dashboard-heading p { margin: 0; font-size: clamp(.83rem, 2.6vw, 1rem); line-height: 1.5; }
.td-dashboard-mascot {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-image: url("mascot-wallet.webp");
}
.td-view-orders .td-dashboard-mascot {
    background-image: url("mascot-orders.webp");
    clip-path: polygon(0 0, 100% 0, 100% 100%, 12% 100%, 12% 66%, 0 66%);
}
.td-status-tabs, .td-wallet-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(5px, 1.8vw, 13px); }
.td-status-tabs a, .td-wallet-actions a {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #f4dcca;
    border-radius: 15px;
    padding: 9px 5px;
    background: #fffaf5;
    color: var(--ink);
    box-shadow: var(--td-shadow);
    text-align: center;
    line-height: 1.3;
    font-size: clamp(.68rem, 2.6vw, .9rem);
    font-weight: 650;
}
.td-status-tabs a { min-height: 48px; }
.td-status-tabs svg { width: 18px; height: 18px; color: var(--td-orange); }
.td-status-tabs .available svg { color: #128244; }
.td-status-tabs .processing svg { color: #145e9a; }
.td-status-tabs a:hover, .td-wallet-actions a:hover { text-decoration: none; border-color: #da9d70; }
.td-status-tabs a[aria-current], .td-wallet-actions a:first-child { background: var(--td-gradient); border-color: #c9510b; color: #fff; }
.td-status-tabs a[aria-current] svg, .td-wallet-actions a:first-child svg { color: #fff4db; }
.td-orders-search { display: flex; flex-wrap: wrap; align-items: stretch; gap: 7px; margin-block: 15px 17px; }
.td-search-field, .td-platform-filter { display: flex; align-items: center; gap: 6px; min-width: 0; padding-inline: 9px; background: #fffefa; border: 1px solid #efcfb9; border-radius: 12px; }
.td-search-field { flex: 1 1 230px; }
.td-platform-filter { flex: 1 1 95px; max-width: 155px; }
.td-orders-search svg { width: 17px; height: 17px; color: var(--td-orange); }
.td-orders-search input, .td-orders-search select { border: 0; min-width: 0; width: 100%; padding: 7px 0; min-height: 42px; background: transparent; color: var(--ink); font-size: clamp(.75rem, 2.7vw, .9rem); }
.td-orders-search .btn { padding-inline: 13px; font-size: .8rem; }

.td-order-list { display: grid; gap: 11px; }
.td-order-card, .td-wallet-history, :is(.td-view-orders, .td-view-wallet) .empty {
    border: 1px solid #fff;
    border-radius: 21px;
    background: var(--td-surface);
    box-shadow: var(--td-shadow);
}
.td-order-card { min-width: 0; padding: clamp(10px, 2.5vw, 18px); }
.td-order-header, .td-wallet-history li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(7px, 2vw, 14px); align-items: center; }
.td-order-header h2 { font-size: clamp(.92rem, 2.7vw, 1.25rem); margin: 0; }
.td-order-id { min-width: 0; overflow-wrap: anywhere; }
.td-order-id small { display: block; font-size: clamp(.66rem, 2.3vw, .84rem); line-height: 1.48; }
.td-order-credit { text-align: right; color: var(--td-orange); }
.td-order-credit strong { display: block; font-size: clamp(.92rem, 3.3vw, 1.3rem); }
.td-order-badge { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 4px 7px; font-weight: 700; font-size: clamp(.63rem, 2.1vw, .78rem); }
.td-order-badge svg { width: 14px; height: 14px; }
.td-order-badge.available { background: #def6df; color: #176531; }
.td-order-badge.processing { background: #e1f0ff; color: #145e9a; }
.td-order-badge.rejected { background: #fbe7e2; color: #9d3323; }
.td-order-detail { margin-top: 10px; padding: 6px; border-radius: 13px; background: #fff0e1; }
.td-order-detail summary { cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding-right: 5px; font-size: .86rem; font-weight: 650; overflow-wrap: anywhere; list-style: none; }
.td-order-detail summary::-webkit-details-marker, .td-nav-menu summary::-webkit-details-marker { display: none; }
.td-order-detail summary > svg { width: 17px; height: 17px; color: var(--td-orange); transform: rotate(-90deg); }
.td-order-detail[open] summary > svg { transform: none; }
.td-order-photo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: #ffe4ca; color: var(--td-orange); overflow: hidden; }
.td-order-photo img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.td-order-detail dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 9px 4px 3px; font-size: .76rem; overflow-wrap: anywhere; }
.td-order-detail dt { color: var(--muted); }
.td-order-detail dd { margin: 0; font-weight: 650; }
.td-orders-note { display: flex; align-items: center; gap: 9px; margin-top: 16px; padding: 10px 13px; border: 1px solid #fff; border-radius: 15px; background: #ffead8; font-size: .83rem; }
.td-orders-note p { margin: 0; }
.td-orders-note svg { color: var(--td-orange); }

.td-wallet-card { border-radius: 22px; background: linear-gradient(145deg, #ffe2ad, #ffe8d1); padding-bottom: 10px; box-shadow: var(--td-shadow); overflow: hidden; }
.td-wallet-top {
    position: relative;
    isolation: isolate;
    display: grid;
    gap: 4px;
    overflow: hidden;
    color: #fff;
    border-radius: 22px;
    background: radial-gradient(ellipse at 96% 95%, #ffa50c88 0%, transparent 58%), linear-gradient(135deg, #ca5d00, #c44300 72%);
    padding: clamp(16px, 4vw, 30px);
}
.td-wallet-top::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: clamp(170px, 35vw, 360px);
    aspect-ratio: 1;
    right: -8%;
    top: -40%;
    border-radius: 50%;
    background: linear-gradient(168deg, #ffa63544, #fff1b000 70%);
}
.td-wallet-label { display: flex; align-items: center; gap: 8px; font-weight: 550; font-size: clamp(.85rem, 3vw, 1.1rem); }
.td-wallet-label button { display: grid; place-items: center; width: 36px; height: 36px; padding: 3px; border: 1px solid #ffffff6b; border-radius: 50%; color: white; background: #ffffff16; cursor: pointer; }
.td-wallet-label button[aria-pressed="true"] { background: #3a1b0e65; }
.td-wallet-amount { font-size: clamp(2rem, 8vw, 3.65rem); line-height: 1.15; overflow-wrap: anywhere; }
.td-wallet-mark { z-index: -1; position: absolute; right: 7%; top: 15%; color: #ffdc9a; opacity: .55; transform: rotate(-12deg); }
.td-wallet-mark svg { width: clamp(58px, 13vw, 104px); height: auto; }
.td-wallet-stats { display: grid; grid-template-columns: 1fr 1fr; padding: 9px; margin: 0 9px; border-radius: 16px; background: #fff9ef; }
.td-wallet-stats > div { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 6px; }
.td-wallet-stats > div + div { border-left: 1px solid #f3d6be; padding-left: clamp(7px, 3vw, 22px); }
.td-wallet-stats small, .td-wallet-breakdown small { display: block; line-height: 1.35; font-size: .75rem; }
.td-wallet-stats strong, .td-wallet-breakdown strong { display: block; font-size: clamp(.93rem, 4vw, 1.48rem); overflow-wrap: anywhere; }
.td-wallet-stats > div:first-child strong { color: var(--td-orange); }
.td-wallet-actions { margin: 15px 0; }
.td-wallet-actions a { flex-direction: column; min-height: 68px; }
.td-wallet-actions svg { width: 24px; height: 24px; color: var(--td-orange); }
.td-wallet-history { padding: clamp(9px, 3vw, 20px); }
.td-wallet-history header { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-bottom: 10px; }
.td-wallet-history h2, .td-wallet-history header a { display: flex; align-items: center; gap: 5px; margin: 0; }
.td-wallet-history h2 { font-size: clamp(.95rem, 3.6vw, 1.44rem); }
.td-wallet-history h2 svg { color: var(--td-orange); width: 1.1em; height: 1.1em; }
.td-wallet-history header a { font-size: clamp(.68rem, 2.35vw, .85rem); font-weight: 650; }
.td-wallet-history header a svg { width: 14px; height: 14px; }
.td-wallet-history ul { padding: 0; margin: 0; list-style: none; }
.td-wallet-history li { border: 1px solid #f9e7da; border-radius: 12px; background: white; padding: 8px; }
.td-wallet-history li + li { margin-top: 6px; }
.td-wallet-history .credited strong { color: #176531; }
.td-wallet-empty { margin: 0; padding: 10px; font-size: .9rem; }
.td-wallet-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-block: 15px; }
.td-wallet-breakdown > div { background: #fff9f3; border: 1px solid #f5dccc; border-radius: 12px; padding: 8px; text-align: center; }
.td-withdraw-grid { margin-top: 18px; }
.td-view-wallet .table-wrap table { min-width: 0; table-layout: fixed; overflow-wrap: anywhere; }
.td-view-wallet .table-wrap th, .td-view-wallet .table-wrap td { padding: 8px; font-size: clamp(.68rem, 2.2vw, .875rem); }
.td-view-wallet .table-wrap td small { font-size: .75rem; line-height: 1.4; }
.td-view-wallet .table-wrap .ht-state { white-space: normal; font-size: inherit; padding: 3px 5px; }

@media (max-width: 850px) {
    .top { height: 62px; }
    .desktop-nav, .td-desktop-lang { display: none; }
    .nav-inner { justify-content: flex-start; gap: clamp(5px, 2vw, 16px); }
    .td-mobile-blog { display: block; margin-left: auto; font-size: .84rem; font-weight: 650; color: var(--ink); }
    .td-nav-menu { display: block; position: relative; }
    .td-nav-menu summary { display: flex; align-items: center; gap: 2px; min-height: 36px; padding: 4px; white-space: nowrap; list-style: none; cursor: pointer; font-size: .83rem; font-weight: 650; }
    .td-nav-menu summary svg { width: 15px; height: 15px; }
    .td-nav-popover {
        position: absolute;
        top: calc(100% + 5px);
        right: 0;
        min-width: 152px;
        max-width: calc(100vw - 16px);
        padding: 6px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fffefa;
        box-shadow: 0 8px 28px #7d3e272e;
        font-size: .86rem;
    }
    .td-nav-popover > a { display: block; padding: 6px 8px; color: var(--ink); }
    .td-nav-popover .td-lang { margin: 5px 0 0; }
    .nav-inner .td-sign-in { padding: 7px 10px; gap: 4px; font-size: .75rem; }
    .nav-inner .td-sign-in svg { width: 15px; height: 15px; }
    .mobile-nav {
        display: grid;
        position: fixed;
        z-index: 24;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 3px;
        padding: 5px max(6px, calc((100vw - 540px) / 2)) calc(5px + env(safe-area-inset-bottom, 0px));
        border: 1px solid #f5dcc8;
        border-radius: 24px 24px 0 0;
        background: #fffdf9;
        box-shadow: 0 -5px 18px #93370c18;
    }
    .mobile-nav a { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; padding: 2px; height: 55px; min-width: 0; border-radius: 17px; font-size: clamp(.65rem, 2.6vw, .81rem); color: #66402c; font-weight: 650; }
    .mobile-nav .td-tab-icon { display: grid; place-items: center; width: 33px; height: 26px; }
    .mobile-nav .td-tab-icon svg { width: 22px; height: 22px; }
    .mobile-nav a[aria-current="page"] { background: #ffe9d6; color: #a53505; }
    .mobile-nav a[aria-current="page"] .td-tab-icon { background: none; }
    .foot { padding-bottom: calc(87px + env(safe-area-inset-bottom, 0px)); }
    :is(.td-view-home, .td-view-orders, .td-view-wallet) { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
    :is(.td-view-home, .td-view-orders, .td-view-wallet) + .foot { display: none; }
    .td-zalo { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 650px) {
    .wrap { width: calc(100% - 26px); }
    .td-home-layout { display: flex; flex-direction: column; gap: 14px; padding: 23px 0 31px; }
    .td-home-copy { align-self: auto; }
    .td-home-copy .eyebrow { font-size: .72rem; padding: 3px 8px; }
    .td-home-copy .eyebrow svg { width: 13px; height: 13px; }
    .td-hero h1 { font-size: clamp(1.18rem, 6.15vw, 2.45rem); margin-block: 9px 13px; width: 77%; }
    .td-home-copy > p { font-size: clamp(.75rem, 2.85vw, .95rem); width: 66%; margin: 15px 0 0; line-height: 1.45; }
    .td-home-art { top: 18px; right: -9px; width: min(43%, 220px); }
    .td-example { margin: 8px auto 0; width: min(94%, 440px); }
    .td-example-platforms > div { font-size: .8rem; }
    .td-example small { font-size: .7rem; }
    .td-example .td-platform-icon, .td-example .td-feature-icon { width: 34px; height: 34px; }
    .td-example .td-platform-icon svg, .td-example .td-feature-icon svg { width: 20px; height: 20px; }
    .td-dashboard-heading { grid-template-columns: minmax(0, 1fr) minmax(85px, 29%); }
    .td-dashboard-heading h1 { gap: 5px; }
    .td-order-header .td-platform-icon, .td-wallet-history .td-platform-icon, .td-wallet-stats .td-feature-icon { width: 35px; height: 35px; border-radius: 10px; }
}
@media (max-width: 430px) {
    .td-status-tabs a { flex-direction: column; gap: 4px; padding: 6px 2px; }
    .td-link-field input { font-size: .81rem; }
    .td-search-field { flex-basis: 150px; }
    .td-platform-filter { flex-basis: 74px; }
    .td-orders-search .btn { padding-inline: 8px; }
}
@media (max-width: 360px) {
    .td-nav-menu summary svg, .td-sign-in svg { display: none; }
    .td-link-field [data-paste] { gap: 4px; min-width: 62px; }
    .td-link-field [data-paste] svg { width: 13px; }
    .td-link-field input { font-size: .76rem; }
    .td-status-tabs { gap: 4px; }
}
