/* H5 全局壳：所有走 layout.php 的页面共用（字体栈与 juzhen system-fonts.css 一致） */
:root {
    --primary: #ff6767;
    --bg: #f5f5f5;
    --tabbar-h: 52px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(
        --font-system,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif
    );
    margin: 0;
    padding: 0 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    color: #333;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page {
    padding: 16px;
    max-width: 480px;
    margin: 0 auto;
    min-height: calc(100vh - var(--tabbar-h) - 32px);
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.topbar a {
    color: var(--primary);
    text-decoration: none;
    font-size: 15px;
}

h1 {
    font-size: 20px;
    margin: 0 0 12px;
    color: #222;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    background: var(--primary);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-outline {
    background: #fff;
    color: var(--primary) !important;
    border: 1px solid var(--primary);
}

input,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 12px;
}

.hint {
    font-size: 13px;
    color: #888;
    margin-top: -8px;
    margin-bottom: 12px;
}

.legal {
    font-size: 14px;
    color: #555;
    white-space: pre-wrap;
}

.err {
    color: #c00;
    font-size: 14px;
    margin-bottom: 8px;
}

.ok {
    color: #080;
    font-size: 14px;
    margin-bottom: 8px;
}

ul.list {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

ul.list li:last-child {
    border-bottom: none;
}

.muted {
    color: #999;
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: #888;
}

.empty-state .illus {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 12px;
    opacity: 0.85;
}

.empty-state .title {
    font-size: 17px;
    color: #555;
    margin-bottom: 8px;
}

.empty-state .desc {
    font-size: 14px;
    margin-bottom: 20px;
}

/* 底部主导航 */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    max-width: 480px;
    margin: 0 auto;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    padding-top: 6px;
}

.tabbar a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: #888;
    font-size: 11px;
    padding: 4px 2px 0;
    line-height: 1.25;
}

.tabbar a .tab-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    margin-bottom: 2px;
    font-size: 18px;
    line-height: 1;
}

.tabbar a .tab-ico i {
    line-height: 1;
}

.tabbar a.active {
    color: var(--primary);
    font-weight: 600;
}
