:root {
    --brand: #fe2c55;
    --brand-dark: #e11d45;
    --dark: #161823;
    --text: #2b2f38;
    --muted: #8a8f99;
    --line: #eef0f4;
    --bg: #f5f6f8;
    --card: #ffffff;
    --radius: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    background: #e9ebef;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

body { min-height: 100vh; }

.page {
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
    padding-bottom: 76px;
    overflow-x: hidden;
}

.page.no-tabbar { padding-bottom: 0; }

a { color: inherit; text-decoration: none; }
img { display: block; border: 0; }
input, button, textarea { font-family: inherit; }

/* 顶部导航 */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 14px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.topbar .back {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    flex: 0 0 auto;
}
.topbar .title { font-size: 16px; font-weight: 600; flex: 1; }
.topbar .right { font-size: 13px; color: var(--muted); }

.home-top {
    background: #fff;
    padding: 12px 14px 10px;
    position: sticky;
    top: 0;
    z-index: 20;
}
.home-top .row { display: flex; align-items: center; gap: 10px; }
.brand {
    font-size: 21px;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: .5px;
    flex: 0 0 auto;
}
.search {
    flex: 1;
    display: flex;
    align-items: center;
    height: 34px;
    padding: 0 10px;
    background: #f3f4f6;
    border-radius: 17px;
    min-width: 0;
}
.search svg { flex: 0 0 auto; margin-right: 6px; }
.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--text);
}
.search input::placeholder { color: #b0b4bc; }

.banner {
    margin: 10px 12px 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #ffe9ee;
}
.banner img { width: 100%; height: 108px; object-fit: cover; }

/* 任务列表 */
.task-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
}
.task-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(22, 24, 35, .05);
    display: block;
}
.task-card .thumb { position: relative; aspect-ratio: 1 / 1; background: #f0f1f4; }
.task-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge-urgent {
    display: inline-block;
    padding: 2px 7px;
    font-size: 11px;
    color: #fff;
    background: var(--brand);
    border-radius: 4px;
    line-height: 16px;
}
.task-card .thumb .badge-urgent {
    position: absolute;
    left: 6px;
    top: 6px;
}
.task-card .body { padding: 8px 9px 10px; }
.task-card .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}
.task-card .time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.task-card .meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 7px;
    gap: 4px;
}
.price { color: var(--brand); font-weight: 700; font-size: 15px; }
.price small { font-size: 11px; font-weight: 500; }
.signup { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* 通用块 */
.section {
    background: #fff;
    margin: 10px 12px;
    border-radius: var(--radius);
    padding: 14px;
}
.section-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 10px;
}
.section-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 15px;
    background: var(--brand);
    border-radius: 2px;
    margin-right: 7px;
    vertical-align: -2px;
}
.rows .row-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #f2f3f6;
    font-size: 14px;
}
.rows .row-item:last-child { border-bottom: 0; }
.rows .label { color: var(--muted); flex: 0 0 auto; }
.rows .value { color: var(--dark); text-align: right; word-break: break-all; }
.rows .value.strong { font-weight: 600; }
.text-block {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f7f8fa;
    border-radius: 8px;
    font-size: 13px;
    color: #4b505b;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.req-item { padding: 9px 0; border-bottom: 1px dashed #f2f3f6; }
.req-item:last-child { border-bottom: 0; }
.req-item .req-label { color: var(--muted); font-size: 13px; margin-bottom: 3px; }
.req-item .req-value { color: var(--dark); font-size: 14px; font-weight: 500; }
.req-item .req-note { color: var(--muted); font-size: 12px; margin-top: 3px; }

.hero { margin: 12px; border-radius: var(--radius); overflow: hidden; background: #f0f1f4; }
.hero img { width: 100%; height: 210px; object-fit: cover; }

.price-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 8px;
}
.price-line .big { font-size: 26px; font-weight: 800; color: var(--brand); }
.price-line .big small { font-size: 13px; font-weight: 500; }
.price-line .info { font-size: 12px; color: var(--muted); }

/* 底部按钮 */
.bottom-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background: #fff;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    display: flex;
    gap: 10px;
    z-index: 30;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: #f1f2f5;
    color: var(--text);
}
.btn.block { flex: 1; width: 100%; }
.btn.primary { background: linear-gradient(90deg, #ff416c, #fe2c55); color: #fff; }
.btn.primary:active { background: var(--brand-dark); }
.btn.ghost { background: #f3f4f6; color: #555b66; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-sm { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 13px; }

/* 底部导航 */
.tabbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: 58px;
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid var(--line);
    display: flex;
    z-index: 30;
}
.tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #9aa0aa;
    font-size: 11px;
}
.tabbar a.active { color: var(--brand); font-weight: 600; }
.tabbar svg { width: 22px; height: 22px; }

/* Tabs */
.tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 52px;
    z-index: 15;
}
.tabs a {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    color: #6b7280;
    position: relative;
}
.tabs a.active { color: var(--dark); font-weight: 700; }
.tabs a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--brand);
}

/* 订单列表 */
.order-card {
    display: flex;
    gap: 10px;
    background: #fff;
    margin: 10px 12px;
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: 0 2px 10px rgba(22, 24, 35, .04);
}
.order-card .cover {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #f0f1f4;
}
.order-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.order-card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.order-card .name { font-size: 15px; font-weight: 600; color: var(--dark); }
.order-card .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.order-card .foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.order-card .amount { font-size: 16px; color: var(--brand); font-weight: 700; }
.order-card .paid { font-size: 13px; color: #e11d45; font-weight: 800; }
.order-card .actions { display: flex; gap: 6px; }

.search-line { padding: 10px 12px 0; }
.search-line .search { background: #fff; height: 38px; }

/* 表单 */
.form-wrap { padding: 18px 16px; }
.form-title { font-size: 24px; font-weight: 800; color: var(--dark); margin: 6px 0 4px; }
.form-sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.field {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 0 12px;
    height: 50px;
    margin-bottom: 12px;
}
.field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 15px;
}
.field .code-btn {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: var(--brand);
    font-size: 13px;
    padding: 6px 0 6px 12px;
    cursor: pointer;
}
.field .code-btn[disabled] { color: #b8bcc4; }
.form-btn { width: 100%; height: 48px; border-radius: 24px; font-size: 16px; margin-top: 8px; }
.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
}
.form-links a { color: var(--brand); }
.skip-link { display: block; text-align: center; margin-top: 16px; color: var(--muted); font-size: 13px; }

/* 我的 */
.me-card {
    background: linear-gradient(135deg, #ff416c, #fe2c55);
    margin: 12px;
    border-radius: 16px;
    padding: 20px 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
}
.me-card .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255,255,255,.25);
    flex: 0 0 auto;
}
.me-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-card .name { font-size: 18px; font-weight: 700; }
.me-card .desc { font-size: 12px; opacity: .9; margin-top: 4px; }
.menu-list { background: #fff; margin: 10px 12px; border-radius: var(--radius); overflow: hidden; }
.menu-list a, .menu-list button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 14px;
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    color: var(--text);
    text-align: left;
}
.menu-list a:last-child, .menu-list button:last-child { border-bottom: 0; }
.menu-list .arrow { color: #c5c9d1; font-size: 16px; }

/* 上传 */
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.upload-item {
    border: 1px dashed #dcdfe6;
    border-radius: 10px;
    overflow: hidden;
    background: #fafbfc;
    cursor: pointer;
}
.upload-item .up-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    font-size: 12px;
    color: #666b75;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.upload-item .up-body {
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b3b7bf;
    font-size: 12px;
}
.upload-item .up-body img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .req-tag { color: var(--brand); font-size: 11px; }

.status-tip {
    margin: 10px 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff7e6;
    color: #b26a00;
    font-size: 13px;
}
.status-tip.done { background: #e9f8ee; color: #1f8a4c; }
.status-tip.canceled { background: #f2f3f5; color: #7a7f88; }

/* 提示 */
.toast {
    position: fixed;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    background: rgba(22, 24, 35, .86);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 999;
    max-width: 80%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.toast.show { opacity: 1; }

.empty { text-align: center; color: #a9aeb7; font-size: 13px; padding: 38px 0; }
.load-more { text-align: center; color: #a9aeb7; font-size: 12px; padding: 8px 0 18px; }
.hidden { display: none !important; }

.skeleton {
    background: linear-gradient(90deg, #f2f3f5 25%, #e9eaee 37%, #f2f3f5 63%);
    background-size: 400% 100%;
    animation: shimmer 1.2s ease infinite;
    border-radius: var(--radius);
    height: 200px;
}
@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}
