/* =========================================================
   藏品价格行情 · 移动优先样式
   ========================================================= */

:root {
    --bg: #f5f3ef;
    --surface: #ffffff;
    --surface-2: #faf8f5;
    --ink: #1b1a18;
    --ink-2: #56524d;
    --ink-3: #8d8781;
    --line: #e8e3db;
    --line-2: #f0ece5;
    --gold: #b3893f;
    --gold-soft: #f7f1e5;
    --brand: #1c1a17;

    --up: #d5372f;
    --down: #17925b;
    --flat: #8d8781;

    --r: 14px;
    --r-sm: 10px;
    --shadow: 0 1px 2px rgba(28, 26, 23, .04), 0 6px 20px -12px rgba(28, 26, 23, .18);
    --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
}

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

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -.01em;
}

.muted {
    color: var(--ink-3);
}

.num {
    font-variant-numeric: tabular-nums;
}

/* ---------------- 页面容器 ---------------- */

.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 14px 14px calc(84px + env(safe-area-inset-bottom));
}

.page-detail {
    padding-top: 6px;
}

.foot {
    margin: 28px 0 4px;
    text-align: center;
    color: var(--ink-3);
    font-size: 12px;
    line-height: 1.7;
}

/* ---------------- 顶栏 ---------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(28, 26, 23, .96);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    color: #fff;
    padding-top: env(safe-area-inset-top);
}

.topbar-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(150deg, #d8b06a, #a97b2c);
    color: #241d0f;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 18px;
    font-family: "Songti SC", "SimSun", serif;
}

.brand-mark.sm {
    width: 28px;
    height: 28px;
    font-size: 15px;
    border-radius: 8px;
}

.brand-mark.lg {
    width: 52px;
    height: 52px;
    font-size: 26px;
    border-radius: 14px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-text b {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-text i {
    font-style: normal;
    font-size: 11px;
    color: rgba(255, 255, 255, .55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ghost-btn {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .22);
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .06);
}

.ghost-btn.sm {
    font-size: 12px;
    padding: 5px 10px;
}

.ghost-btn:active {
    background: rgba(255, 255, 255, .16);
}

/* ---------------- 搜索条 ---------------- */

.searchbar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 5px 5px 14px;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
}

.search-ico {
    color: var(--ink-3);
    font-size: 17px;
    line-height: 1;
}

.searchbar input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    padding: 8px 0;
}

.searchbar input::placeholder {
    color: var(--ink-3);
}

.searchbar button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    padding: 8px 16px;
    cursor: pointer;
}

.searchbar button:active {
    opacity: .82;
}

/* ---------------- 数据条 ---------------- */

.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 10px 8px;
    text-align: center;
}

.stat b {
    display: block;
    font-size: 17px;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.stat span {
    font-size: 11px;
    color: var(--ink-3);
}

/* ---------------- 分类胶囊 ---------------- */

.chips {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chips.wrap {
    flex-wrap: wrap;
    overflow: visible;
}

.chips a {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-2);
    white-space: nowrap;
}

.chips a.on {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

/* ---------------- 区块标题 ---------------- */

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 4px 2px 10px;
}

.section-head h2 {
    font-size: 15px;
}

.text-link {
    font-size: 13px;
    color: var(--gold);
}

.text-link.center {
    display: block;
    text-align: center;
    margin-top: 16px;
}

/* ---------------- 藏品卡片 ---------------- */

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

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .16s ease;
}

.card:active {
    transform: scale(.985);
}

.thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    overflow: hidden;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb.is-ph {
    background:
            radial-gradient(120% 120% at 20% 15%, #fbf6ea 0%, #efe7d7 55%, #e4d9c4 100%);
    display: grid;
    place-items: center;
}

.ph-char {
    font-family: "Songti SC", "SimSun", serif;
    font-size: 34px;
    color: rgba(140, 108, 45, .38);
    line-height: 1;
    user-select: none;
}

.ph-char.big {
    font-size: 84px;
}

.tag-feat {
    position: absolute;
    top: 8px;
    right: 8px;
    font-style: normal;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(28, 26, 23, .78);
    color: #e8c982;
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 9px 10px 11px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.card-body h3 {
    font-size: 13.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 11px;
    min-height: 18px;
}

.pill {
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: #8a6524;
    border: 1px solid #ecdfc4;
}

.pill.ghost {
    background: var(--surface-2);
    color: var(--ink-2);
    border-color: var(--line);
}

.price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
    padding-top: 3px;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 1px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.price i {
    font-style: normal;
    font-size: 11px;
    color: var(--ink-2);
}

.price b {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.chg {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.chg.big {
    font-size: 15px;
}

.chg.up {
    color: var(--up);
}

.chg.down {
    color: var(--down);
}

.chg.flat {
    color: var(--flat);
}

/* ---------------- 空态 / 分页 ---------------- */

.empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--ink-3);
}

.empty-ico {
    font-size: 34px;
    color: var(--line);
    margin-bottom: 6px;
}

.empty p {
    margin: 0 0 10px;
    font-size: 14px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 20px 0 6px;
}

.pg-btn {
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-2);
}

.pg-info {
    font-size: 13px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}

/* ---------------- 详情页 ---------------- */

.backlink {
    display: inline-block;
    font-size: 13px;
    color: var(--ink-2);
    padding: 6px 0 10px;
}

.hero {
    position: relative;
    border-radius: var(--r);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero.is-ph {
    background: radial-gradient(120% 120% at 22% 12%, #fcf8ef 0%, #f0e8d8 52%, #e2d6bf 100%);
    display: grid;
    place-items: center;
}

.head-block {
    padding: 14px 2px 0;
}

.head-block h1 {
    font-size: 19px;
    line-height: 1.35;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.price-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 15px 16px;
    border-radius: var(--r);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--flat);
}

.price-hero.up {
    border-left-color: var(--up);
}

.price-hero.down {
    border-left-color: var(--down);
}

.ph-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ph-label {
    font-size: 12px;
    color: var(--ink-3);
}

.ph-value {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-variant-numeric: tabular-nums;
}

.ph-value i {
    font-style: normal;
    font-size: 15px;
    color: var(--ink-2);
}

.ph-value b {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.ph-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex: 0 0 auto;
}

.ph-sub {
    font-size: 11px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}

.kv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.kv {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kv span {
    font-size: 11px;
    color: var(--ink-3);
}

.kv b {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.card-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 14px;
    margin-top: 10px;
    box-shadow: var(--shadow);
}

.block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.block-head h2 {
    font-size: 15px;
}

.block-head .muted {
    font-size: 12px;
}

.desc {
    margin: 0;
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.bullet {
    margin: 0;
    padding-left: 18px;
    font-size: 13.5px;
    color: var(--ink-2);
    line-height: 1.85;
}

.bullet.mono li {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: #7a5a1f;
    word-break: break-all;
}

/* 走势图 */

.chart-wrap {
    position: relative;
    min-height: 132px;
}

.chart-wrap svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.chart-skeleton {
    height: 132px;
    display: grid;
    place-items: center;
    color: var(--ink-3);
    font-size: 12px;
    background: linear-gradient(100deg, var(--surface-2) 30%, #f3efe7 50%, var(--surface-2) 70%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
    border-radius: var(--r-sm);
}

@keyframes shimmer {
    from {
        background-position: 150% 0;
    }
    to {
        background-position: -50% 0;
    }
}

.chart-empty {
    height: 132px;
    display: grid;
    place-items: center;
    color: var(--ink-3);
    font-size: 12px;
}

/* 记录表 */

.rec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rec-table th {
    text-align: left;
    font-weight: 500;
    font-size: 11px;
    color: var(--ink-3);
    padding: 0 0 7px;
    border-bottom: 1px solid var(--line);
}

.rec-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--line-2);
    color: var(--ink-2);
    font-variant-numeric: tabular-nums;
}

.rec-table tr:last-child td {
    border-bottom: 0;
}

.rec-table td.num {
    color: var(--ink);
    font-weight: 600;
}

/* 同类藏品 */

.related {
    display: flex;
    flex-direction: column;
}

.rel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-2);
}

.rel-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.rel-name {
    font-size: 13.5px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rel-price {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.rel-price i {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
}

.rel-price i.up {
    color: var(--up);
}

.rel-price i.down {
    color: var(--down);
}

.rel-price i.flat {
    color: var(--flat);
}

/* ---------------- 底部导航 ---------------- */

.bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
}

.bottomnav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 7px 0 8px;
    color: var(--ink-3);
    font-size: 10.5px;
}

.bottomnav a.on {
    color: var(--gold);
}

.bn-ico {
    font-size: 17px;
    line-height: 1.1;
}

/* ---------------- 提示 ---------------- */

.flash-ok,
.flash-err {
    border-radius: var(--r-sm);
    padding: 9px 12px;
    font-size: 13px;
    margin-bottom: 12px;
    border: 1px solid;
}

.flash-ok {
    background: #f0f9f3;
    border-color: #cfe9d9;
    color: #17694a;
}

.flash-err {
    background: #fdf1f0;
    border-color: #f2d3d1;
    color: #b3392f;
}

/* =========================================================
   后台
   ========================================================= */

.admin-body {
    background: #f4f2ee;
}

.adminbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--brand);
    color: #fff;
    padding-top: env(safe-area-inset-top);
}

.adminbar-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.adminbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
}

.adminnav {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 8px 0;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.adminnav::-webkit-scrollbar {
    display: none;
}

.adminnav a {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 8px 13px 10px;
    color: rgba(255, 255, 255, .58);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.adminnav a.on {
    color: #fff;
    border-bottom-color: var(--gold);
    font-weight: 600;
}

.page-admin {
    max-width: 860px;
    padding-bottom: 40px;
}

.page-title {
    font-size: 18px;
    margin: 4px 2px 12px;
}

.admin-stat {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-bottom: 12px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 10px;
    margin-bottom: 14px;
}

.filter-bar input[type="search"],
.filter-bar input[type="text"],
.filter-bar input[type="number"],
.filter-bar select {
    flex: 1 1 130px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    padding: 9px 11px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    outline: 0;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--gold);
    background: #fff;
}

.filter-bar .sort-input {
    flex: 0 0 80px;
}

.filter-bar .push {
    margin-left: auto;
}

.list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 2px 8px;
    font-size: 13px;
    font-weight: 600;
}

.list-head .muted {
    font-weight: 400;
    font-size: 12px;
}

/* 后台列表行 */

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

.admin-row {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    grid-template-areas:
        "thumb main price"
        "thumb ops ops";
    gap: 8px 11px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 10px;
}

.ar-thumb {
    grid-area: thumb;
    width: 52px;
    height: 52px;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    font-family: "Songti SC", "SimSun", serif;
    font-size: 20px;
    color: rgba(140, 108, 45, .45);
}

.ar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ar-thumb.is-ph {
    background: radial-gradient(120% 120% at 25% 15%, #fbf6ea, #e6dbc6);
}

.ar-main {
    grid-area: main;
    min-width: 0;
}

.ar-title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ar-title b {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.status-dot {
    font-style: normal;
    font-size: 10.5px;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid;
}

.status-dot.on {
    color: #17694a;
    background: #eff8f3;
    border-color: #cfe9d9;
}

.status-dot.off {
    color: #8a7f74;
    background: #f4f2ee;
    border-color: var(--line);
}

.status-dot.feat {
    color: #8a6524;
    background: var(--gold-soft);
    border-color: #ecdfc4;
}

.ar-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--ink-3);
}

.ar-price {
    grid-area: price;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.ar-price b {
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.ar-price i {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
}

.ar-price i.up {
    color: var(--up);
}

.ar-price i.down {
    color: var(--down);
}

.ar-price i.flat {
    color: var(--flat);
}

.ar-ops {
    grid-area: ops;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
    margin: 0;
}

.op-btn {
    font-size: 12px;
    font-family: inherit;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink-2);
    cursor: pointer;
}

.op-btn.danger {
    color: #b3392f;
    border-color: #f0d6d3;
    background: #fdf4f3;
}

.op-btn:active {
    opacity: .7;
}

/* 分类列表 */

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

.cat-row {
    display: flex;
    align-items: center;
    gap: 11px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 11px 13px;
}

.cat-index {
    flex: 0 0 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--gold-soft);
    color: #8a6524;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
}

.cat-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.cat-sort {
    font-size: 11.5px;
}

/* 表单 */

.form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 15px;
    box-shadow: var(--shadow);
}

.form-card.narrow {
    max-width: 440px;
}

.field {
    margin-bottom: 13px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.field label {
    display: block;
    font-size: 12.5px;
    color: var(--ink-2);
    margin-bottom: 5px;
    font-weight: 500;
}

.req {
    color: var(--up);
    font-style: normal;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field input[type="file"],
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    padding: 10px 12px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--ink);
    outline: 0;
    transition: border-color .15s, background .15s;
}

.field textarea {
    resize: vertical;
    line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--gold);
    background: #fff;
}

.hint {
    display: block;
    font-size: 11.5px;
    color: var(--ink-3);
    margin-top: 4px;
}

.upload-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.upload-preview {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-size: 12px;
    color: var(--ink-3);
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-ctrl {
    flex: 1;
    min-width: 0;
}

.switch-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding: 4px 0 14px;
}

.switch {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: var(--ink-2);
}

.switch input {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 3px;
}

.btn-primary {
    border: 0;
    border-radius: var(--r-sm);
    background: var(--brand);
    color: #fff;
    font-size: 14.5px;
    font-family: inherit;
    font-weight: 500;
    padding: 11px 22px;
    cursor: pointer;
}

.btn-primary.sm {
    font-size: 13px;
    padding: 9px 15px;
}

.btn-primary:active {
    opacity: .85;
}

.btn-ghost {
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 14px;
    font-family: inherit;
    padding: 10px 18px;
    cursor: pointer;
}

.btn-ghost.sm {
    font-size: 13px;
    padding: 8px 13px;
}

.btn-ghost.danger {
    color: #b3392f;
    border-color: #f0d6d3;
}

/* 登录页 */

.login-body {
    background: var(--brand);
    min-height: 100vh;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 20px;
    padding: 26px 22px 22px;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .5);
}

.login-brand {
    text-align: center;
    margin-bottom: 18px;
}

.login-brand .brand-mark {
    margin: 0 auto 11px;
}

.login-brand h1 {
    font-size: 18px;
}

.login-brand p {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--ink-3);
}

.login-form label {
    display: block;
    margin-bottom: 12px;
}

.login-form label span {
    display: block;
    font-size: 12.5px;
    color: var(--ink-2);
    margin-bottom: 5px;
}

.login-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    padding: 11px 13px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    outline: 0;
}

.login-form input:focus {
    border-color: var(--gold);
    background: #fff;
}

.login-form .btn-primary {
    width: 100%;
    margin-top: 4px;
    letter-spacing: .1em;
}

/* =========================================================
   响应式
   ========================================================= */

@media (min-width: 560px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .field-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 760px) {
    .bottomnav {
        display: none;
    }

    .page {
        padding-bottom: 40px;
    }

    .admin-row {
        grid-template-columns: 56px 1fr auto auto;
        grid-template-areas: "thumb main price ops";
        align-items: center;
    }

    .ar-ops {
        justify-content: flex-end;
    }

    .head-block h1 {
        font-size: 22px;
    }

    .ph-value b {
        font-size: 34px;
    }
}
