:root {
    --bg: #f5f6f8;
    --card: #ffffff;
    --text: #1f2328;
    --sub: #6b7280;
    --line: #eceef1;
    --brand: #2f6fed;
    --danger: #e5484d;
    --warn: #f76808;
    --ok: #12a150;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.page {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 14px 40px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0 14px;
}

.topbar h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.back {
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    padding: 0 6px 4px 0;
    cursor: pointer;
    color: var(--text);
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.state-card {
    text-align: center;
    padding: 32px 20px;
}

.state-icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 12px;
}

.state-card h2 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
}

.state-card p {
    margin: 0;
    color: var(--sub);
    font-size: 13.5px;
}

.btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 0;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
}

.btn:disabled {
    opacity: .55;
}

.btn-ghost {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-danger {
    background: #fef4f4;
    color: var(--danger);
    border: 1px solid #f6d3d4;
}

.label {
    font-size: 13px;
    color: var(--sub);
    margin: 4px 0 8px;
}

.option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    background: #fff;
}

.option.active {
    border-color: var(--brand);
    background: #f5f9ff;
}

.option .radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #c9ced6;
    flex: none;
    position: relative;
}

.option.active .radio {
    border-color: var(--brand);
}

.option.active .radio::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand);
}

.option .name {
    font-size: 14.5px;
    font-weight: 500;
}

.option .meta {
    font-size: 12px;
    color: var(--sub);
}

.tip {
    font-size: 12.5px;
    color: #9aa1ab;
    margin-top: 10px;
    line-height: 1.7;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%) translateY(10px);
    background: rgba(31, 35, 40, .9);
    color: #fff;
    padding: 9px 16px;
    border-radius: 20px;
    font-size: 13px;
    opacity: 0;
    transition: all .2s;
    z-index: 999;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 列表行 */
.row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.row:last-child {
    border-bottom: none;
}

.row .grow {
    flex: 1;
    min-width: 0;
}

.row .title {
    font-size: 14.5px;
    font-weight: 500;
}

.row .desc {
    font-size: 12.5px;
    color: var(--sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mono {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    letter-spacing: .5px;
}

.chip {
    display: inline-block;
    font-size: 11.5px;
    padding: 1px 7px;
    border-radius: 5px;
    background: #f2f4f7;
    color: var(--sub);
}

.chip.ok {
    background: #f2fbf6;
    color: var(--ok);
}

.chip.off {
    background: #fef4f4;
    color: var(--danger);
}

.mini {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font-size: 12.5px;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.mini.danger {
    color: var(--danger);
    border-color: #f6d3d4;
}

.input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    background: #fbfcfd;
    color: var(--text);
    outline: none;
    font-family: inherit;
    margin-bottom: 8px;
}

.input:focus {
    border-color: var(--brand);
    background: #fff;
}

.presets {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 2px 0 12px;
}

.presets button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--sub);
    font-size: 12.5px;
    padding: 5px 11px;
    border-radius: 16px;
    cursor: pointer;
    font-family: inherit;
}

.presets button.active {
    background: #eef4ff;
    border-color: #cddffd;
    color: var(--brand);
}

/* 提醒文案预览 */
.preview {
    background: #f7f8fa;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.75;
    color: var(--text);
    white-space: pre-wrap;
}
