/* 赐名 · 简洁栈式表单 */

body.naming-page {
    --nm-control-h: 48px;
    --nm-control-radius: 20px;
}

body.naming-page footer {
    display: none !important;
}

@media (max-width: 768px) {
    body.naming-page.in-expanded-view:not(.keyboard-open) #mainContainer.container.expanded-mode {
        height: calc(100dvh - 12px);
        max-height: calc(100dvh - 12px);
        margin-top: 0;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    body.naming-page.in-expanded-view:not(.keyboard-open) .nav-card.expanded.naming-flow-card {
        height: 100%;
        max-height: 100%;
    }

    body.naming-page.in-expanded-view.keyboard-open .nav-card.expanded.naming-flow-card,
    body.naming-page.keyboard-open .nav-card.expanded.naming-flow-card {
        justify-content: flex-start !important;
        padding-top: 10px !important;
    }
}

body.naming-page #mainContainer {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

body.naming-page .nav-card.expanded.naming-flow-card {
    cursor: default;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px 18px !important;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body.naming-page .naming-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
    flex: 0 1 auto;
    min-height: 0;
}

/* 结果页：内容区占满卡片高度，列表内部滚动 */
body.naming-page .naming-content:has(#nmStepResult:not([hidden])) {
    flex: 1 1 auto;
    align-self: stretch;
    max-width: none;
    overflow: hidden;
}

body.naming-page .nav-card.expanded.naming-flow-card:has(#nmStepResult:not([hidden])) {
    justify-content: flex-start !important;
    padding-top: 16px !important;
    padding-bottom: 12px !important;
}

/* 历史页：整体垂直居中 */
body.naming-page .naming-content:has(#nmStepHistory:not([hidden])) {
    flex: 1 1 auto;
    align-self: stretch;
    max-width: none;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

body.naming-page .nav-card.expanded.naming-flow-card:has(#nmStepHistory:not([hidden])),
body.naming-page .nav-card.expanded.naming-flow-card.naming-flow-card--history-open {
    justify-content: center !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

.nm-form {
    flex: 0 0 auto;
    width: 100%;
}

#nmStepResult.nm-step--result {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.nm-form,
#nmStepResult {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#nmStepForm[hidden],
#nmStepResult[hidden],
#nmStepHistory[hidden] {
    display: none !important;
}

/* 姓氏 */
body.naming-page .nm-form .input-group {
    width: 100%;
    max-width: 280px;
    margin-bottom: 18px;
}

body.naming-page .nm-form .input-group label {
    font-size: 12px;
    letter-spacing: 0.14em;
    margin-bottom: 6px;
}

body.naming-page .nm-form .input-group > input {
    height: var(--nm-control-h);
    padding: 0 12px;
    font-size: 16px;
    letter-spacing: 0.1em;
    border-radius: var(--nm-control-radius);
    box-sizing: border-box;
    line-height: normal;
    user-select: text;
    -webkit-user-select: text;
}

/* 全宽切换条（性别 / 主副） */
.nm-toggle-row {
    width: 100%;
    max-width: 280px;
    margin-bottom: 16px;
}

.nm-toggle-row .gender-toggle-btn {
    height: var(--nm-control-h);
    min-height: var(--nm-control-h);
    padding: 0;
    border-radius: var(--nm-control-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    letter-spacing: 0.18em;
    box-sizing: border-box;
}

/* 喜用神区块 */
.nm-xiyong-block {
    width: 100%;
    max-width: 280px;
    margin-bottom: 16px;
    text-align: center;
}

.nm-section-label {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--ios-text-secondary);
    font-weight: 400;
}

body.dark-theme.naming-page .nav-card.expanded .nm-section-label {
    color: #5a6170 !important;
}

.nm-xiyong-row {
    margin-bottom: 8px;
}

.nm-xiyong-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: var(--nm-control-h);
    min-height: var(--nm-control-h);
    padding: 0;
    line-height: 1.1;
    box-sizing: border-box;
}

.nm-slot-tag {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.16em;
}

.nm-slot-wx {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.nm-xiyong-slot.nm-xiyong-slot--filled .nm-slot-tag {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
    opacity: 0.55;
}

.nm-xiyong-slot.nm-xiyong-slot--filled {
    color: rgba(27, 31, 42, 0.9);
}

body.dark-theme.naming-page .nav-card.expanded .nm-xiyong-slot.nm-xiyong-slot--filled {
    color: #1b1f2a !important;
}

.nm-sub-link {
    border: none;
    background: none;
    padding: 4px 8px;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--ios-text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nm-sub-link:active {
    opacity: 0.6;
}

body.dark-theme.naming-page .nav-card.expanded .nm-sub-link {
    color: #55607a !important;
}

/* 高级偏好 */
.nm-pref-btn {
    width: 100%;
    max-width: 280px;
    height: var(--nm-control-h) !important;
    min-height: var(--nm-control-h) !important;
    margin: 0 0 4px !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    letter-spacing: 0.14em !important;
    border-radius: var(--nm-control-radius) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.nm-pref-btn.nm-pref-btn--set {
    box-shadow: inset 0 0 0 1px rgba(27, 31, 42, 0.18);
}

.nm-form-tip {
    width: 100%;
    max-width: 280px;
    margin: 4px 0 6px;
    font-size: 12px;
    text-align: center;
    color: #c0392b;
    letter-spacing: 0.04em;
}

.nm-submit-btn {
    width: 100%;
    max-width: 280px;
    height: var(--nm-control-h) !important;
    min-height: var(--nm-control-h) !important;
    margin-top: 22px !important;
    margin-bottom: 6px !important;
    padding: 0 48px !important;
    font-size: 15px !important;
    letter-spacing: 0.2em !important;
    border-radius: var(--nm-control-radius) !important;
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* 赐名加载态：复用喜用绿色进度条，文案略宽 */
body.naming-page .nm-submit-btn.loading-progress--xiyong {
    min-width: 280px;
    max-width: 280px;
    width: 100%;
}

body.naming-page .nm-submit-btn.loading-progress--xiyong .btn-label-slot {
    width: 11.5em;
    min-width: 11.5em;
    font-size: 13px;
}

body.naming-page .nm-flow-back {
    margin-top: 0;
    cursor: pointer;
}

.nm-step--quota-only .nm-result-list,
.nm-step--quota-only .nm-celebrity-panel {
    display: none;
}

.nm-step--history {
    flex: 0 1 auto;
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.nm-history-list-only {
    width: 100%;
    max-height: min(58vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nm-history-empty-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    padding: 20px 0 12px;
    box-sizing: border-box;
}

.nm-history-empty-box {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 24px 16px;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.65;
    text-align: center;
    color: var(--ios-text-secondary);
    letter-spacing: 0.04em;
}

.nm-history-empty-back {
    width: 50%;
    max-width: 140px;
    min-width: 0;
    margin: 0 auto;
    flex: none;
    align-self: center;
}

body.dark-theme.naming-page .nav-card.expanded .nm-history-empty-box {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(223, 231, 255, 0.72);
}

.nm-step--history-view .nm-history-detail-back {
    display: block;
}

.nm-step--history-view .nm-result-actions {
    display: none;
}

.nm-form-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6em;
    width: 100%;
    max-width: 280px;
    margin-top: 12px;
}

.nm-form-foot .back-link {
    margin-top: 0;
}

.nm-history-page .naming-content {
    padding-bottom: 24px;
}

.nm-history-page-head {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 12px;
    text-align: center;
}

.nm-history-page-head .xiyong-history-hint {
    margin-bottom: 0;
}

.nm-history-detail-back {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 10px;
    text-align: left;
}

.nm-history-detail-title {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--ios-text-main);
    text-align: center;
}

.nm-flow-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6em;
    width: 100%;
    max-width: 280px;
    margin-top: 2px;
}

.nm-flow-foot--result {
    margin-top: 12px;
}

.nm-history-hint {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ios-text-secondary);
    text-align: center;
}

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

.nm-history-empty {
    margin: 0;
    padding: 16px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--ios-text-secondary);
}

.nm-history-item {
    display: block;
    width: 100%;
    padding: 12px 12px 11px;
    border: 1px solid rgba(60, 60, 67, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

body.dark-theme.naming-page .nm-history-item {
    background: rgba(255, 255, 255, 0.92);
}

.nm-history-item:active {
    transform: scale(0.99);
}

.nm-history-item-time {
    margin: 0 0 4px;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--ios-text-secondary);
}

.nm-history-item-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #1c1c1e;
}

/* —— 结果 —— */
.nm-result-tip {
    max-width: 280px;
    margin-bottom: 8px;
}

.nm-quota-blocked {
    width: 100%;
    max-width: 280px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    color: #8a5a00;
    background: rgba(255, 236, 179, 0.72);
    border: 1px solid rgba(212, 160, 23, 0.35);
}

body.dark-theme.naming-page .nm-quota-blocked {
    color: #ffd875;
    background: rgba(120, 90, 20, 0.35);
    border-color: rgba(212, 160, 23, 0.45);
}

.nm-wechat-qr {
    width: 100%;
    max-width: 280px;
    margin-top: 14px;
    padding: 16px 14px 18px;
    border-radius: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(212, 160, 23, 0.28);
    box-shadow: 0 2px 8px rgba(120, 90, 20, 0.08);
}

body.dark-theme.naming-page .nm-wechat-qr {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(212, 160, 23, 0.35);
}

.nm-wechat-qr-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #6b4a12;
}

.nm-wechat-qr-hint {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #8a5a00;
}

.nm-wechat-qr-img {
    display: block;
    width: 168px;
    height: 168px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.nm-result-list {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.nm-celebrity-panel {
    width: 100%;
    max-width: 280px;
    margin-bottom: 14px;
}

.nm-celebrity-box {
    padding: 14px 14px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.nm-celebrity-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #2c2c2c;
    letter-spacing: 0.04em;
}

.nm-celebrity-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nm-celebrity-item {
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.nm-celebrity-item:first-child {
    padding-top: 0;
    border-top: none;
}

.nm-celebrity-name {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.nm-celebrity-era {
    font-weight: 500;
    color: #666;
    font-size: 12px;
}

.nm-celebrity-brief {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #555;
}

body.dark-theme .nm-celebrity-box {
    background: rgba(40, 40, 40, 0.92);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .nm-celebrity-title,
body.dark-theme .nm-celebrity-name {
    color: #eee;
}

body.dark-theme .nm-celebrity-era,
body.dark-theme .nm-celebrity-brief {
    color: #bbb;
}

.nm-result-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    justify-content: center;
    flex-wrap: wrap;
}

.nm-result-actions .small-btn {
    flex: 1 1 0;
    min-width: 118px;
    max-width: 135px;
}

/* 结果页再次生成：与开始赐名同款绿色进度条 */
body.naming-page .nm-result-actions.is-regenerating {
    max-width: 280px;
}

body.naming-page .nm-result-actions .action-btn.loading-progress.loading-progress--xiyong {
    flex: 1 1 100%;
    min-width: 280px;
    max-width: 280px;
    margin: 0;
    background: #171a22 !important;
    color: #fff !important;
    border-color: transparent !important;
}

body.naming-page .nm-result-actions .action-btn.loading-progress--xiyong .btn-label-slot {
    width: 11.5em;
    min-width: 11.5em;
    font-size: 13px;
}

body.naming-page .nm-result-actions.is-regenerating .action-btn:not(.loading-progress--xiyong) {
    display: none;
}

.nm-single-advice {
    padding: 14px 14px 12px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: rgba(255, 248, 235, 0.92);
    border: 1px solid rgba(180, 140, 60, 0.22);
    text-align: left;
}

.nm-single-advice-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #6b4e12;
}

.nm-single-advice-list {
    margin: 0;
    padding-left: 1.25em;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(60, 44, 12, 0.88);
}

.nm-single-advice-list li + li {
    margin-top: 6px;
}

body.dark-theme.naming-page .nm-single-advice {
    background: rgba(255, 252, 245, 0.96);
    border-color: rgba(180, 140, 60, 0.28);
}

.nm-name-card {
    padding: 14px 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(60, 60, 67, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-align: left;
}

body.dark-theme.naming-page .nm-name-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(60, 60, 67, 0.1);
}

.nm-name-card--export {
    background: #fff !important;
    border-color: rgba(60, 60, 67, 0.12) !important;
    box-shadow: none !important;
}

.nm-name-card--export .nm-name-card-actions {
    visibility: hidden;
}

.nm-name-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.nm-name-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nm-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(60, 60, 67, 0.22);
    border-radius: 6px;
    background: #fff;
    color: rgba(60, 60, 67, 0.55);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
    box-shadow: none;
}

.nm-icon-btn svg {
    width: 14px;
    height: 14px;
    display: block;
}

.nm-icon-btn:active {
    opacity: 0.78;
    border-color: rgba(60, 60, 67, 0.35);
}

.nm-icon-btn.nm-icon-btn--ok {
    color: #34c759;
    border-color: rgba(52, 199, 89, 0.45);
    background: #fff;
}

.nm-icon-btn.nm-icon-btn--busy {
    opacity: 0.55;
    cursor: wait;
}

.nm-src-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 0.08em;
    font-weight: 600;
    line-height: 1.2;
    flex-shrink: 0;
}

.nm-src-tag--ai {
    color: #5b3ea6;
    background: rgba(91, 62, 166, 0.12);
}

.nm-src-tag--ai-qwen {
    color: #6b4e12;
    background: rgba(198, 160, 56, 0.22);
}

.nm-src-tag--ai-ds {
    color: #1a5c8a;
    background: rgba(26, 92, 138, 0.14);
}

.nm-src-tag--case {
    color: #8a6d00;
    background: rgba(255, 214, 102, 0.52);
}

.nm-src-tag--lib {
    color: #1a7f4b;
    background: rgba(26, 127, 75, 0.12);
}

.nm-name-mizi {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-bottom: 4px;
}

.nm-mizi-char-wrap {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.nm-mizi-cell {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1.5px solid rgba(10, 132, 255, 0.42);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    cursor: pointer;
}

.nm-mizi-cell:focus-visible {
    outline: 2px solid rgba(10, 132, 255, 0.55);
    outline-offset: 2px;
}

body.dark-theme.naming-page .nm-mizi-cell {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(10, 132, 255, 0.38);
}

.nm-mizi-lines {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    --nm-mizi-ln: rgba(60, 60, 67, 0.2);
    background:
        linear-gradient(90deg, transparent calc(50% - 0.4px), var(--nm-mizi-ln) 0, var(--nm-mizi-ln) calc(50% + 0.4px), transparent 0),
        linear-gradient(0deg, transparent calc(50% - 0.4px), var(--nm-mizi-ln) 0, var(--nm-mizi-ln) calc(50% + 0.4px), transparent 0),
        linear-gradient(45deg, transparent 49.55%, var(--nm-mizi-ln) 49.55%, var(--nm-mizi-ln) 50.45%, transparent 50.45%),
        linear-gradient(-45deg, transparent 49.55%, var(--nm-mizi-ln) 49.55%, var(--nm-mizi-ln) 50.45%, transparent 50.45%);
    opacity: 0.88;
}

.nm-mizi-char {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: clamp(22px, 7vw, 28px);
    font-weight: 600;
    color: #1b1f2a;
    letter-spacing: 0.02em;
}

/* 与姓名打分一致：字下最多两行五行占比（仅五行起名时显示） */
.nm-result-meta {
    margin-top: 5px;
    min-height: 2.5em;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nm-name-card--no-wx .nm-result-meta {
    display: none;
}

.nm-result-meta-line {
    margin: 0;
    line-height: 1.2;
    font-size: 11px;
    color: rgba(60, 60, 67, 0.78);
}

.nm-result-meta-line--wx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--wx-color, #c8c8cc) 42%, white);
    color: #1b1f2a;
    font-weight: 600;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
}

.nm-name-block {
    margin-top: 12px;
}

.nm-name-block-label {
    display: inline-block;
    padding: 4px 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(52, 199, 89, 0.16);
    color: #1d6b3f;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
}

body.dark-theme.naming-page .nav-card.expanded .nm-name-block-label {
    background: rgba(52, 199, 89, 0.2);
    color: #1a5c34;
}

.nm-name-block-text {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.035);
    font-size: 13px;
    line-height: 1.68;
    letter-spacing: 0.03em;
    color: #3a3a3c;
}

.nm-origin-part {
    display: block;
}

.nm-origin-part + .nm-origin-part {
    margin-top: 0.3em;
}

.nm-text-highlight {
    color: #c45c00;
    font-weight: 600;
}

body.dark-theme.naming-page .nav-card.expanded .nm-text-highlight {
    color: #b45309;
}

body.dark-theme.naming-page .nav-card.expanded .nm-name-block-text {
    color: #3a3a3c;
    background: rgba(0, 0, 0, 0.04);
}

/* 可搭配其他组合：与出处同背景，仅标签文案不同 */
.nm-name-block--alternatives .nm-name-block-label {
    letter-spacing: 0.06em;
}

.nm-name-block--alternatives .nm-name-block-text {
    font-weight: 600;
    letter-spacing: 0.06em;
}

.nm-dual-wx-note {
    margin-top: 12px;
    padding: 10px 11px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
    text-align: left;
    color: #5c4a28;
    background: rgba(255, 248, 230, 0.85);
    border: 1px dashed rgba(168, 132, 68, 0.35);
}

body.dark-theme.naming-page .nm-dual-wx-note {
    color: #6b5430;
    background: rgba(255, 248, 230, 0.92);
    border-color: rgba(168, 132, 68, 0.42);
}

.nm-name-empty {
    margin: 0;
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--ios-text-secondary);
}

/* —— Sheet —— */
.nm-sheet {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.nm-sheet:not([hidden]) {
    pointer-events: auto;
}

.nm-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.26s ease;
}

.nm-sheet.nm-sheet--open .nm-sheet-backdrop {
    opacity: 1;
}

.nm-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: min(85vh, 560px);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 18px 18px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.nm-sheet-panel--wx {
    max-height: none;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.nm-sheet.nm-sheet--open .nm-sheet-panel {
    transform: translateY(0);
}

.nm-sheet-grabber {
    width: 34px;
    height: 4px;
    margin: 9px auto 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.14);
}

.nm-sheet-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    flex-shrink: 0;
}

.nm-pref-sheet-tip {
    flex-shrink: 0;
    margin: 0 18px 6px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
    letter-spacing: 0.04em;
}

body.dark-theme.naming-page .nm-pref-sheet-tip {
    background: rgba(255, 120, 100, 0.14);
    color: #ff8a7a;
}

.nm-sheet-nav-spacer {
    display: none;
}

.nm-sheet-title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.14em;
    line-height: 1.3;
}

.nm-sheet-done {
    border: none;
    background: none;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--ios-text-main);
    cursor: pointer;
    min-width: 44px;
    padding: 2px 0 0;
    text-align: right;
    line-height: 1.3;
}

.nm-sheet-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 18px 22px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}

.nm-sheet-quota {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.05);
    font-size: 13px;
    color: var(--ios-text-secondary);
}

.nm-quota-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.nm-quota-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
}

.nm-quota-panel-label {
    flex: 0 0 auto;
}

.nm-quota-panel-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
}

.nm-quota-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ios-text-secondary);
    cursor: pointer;
}

.nm-quota-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.nm-quota-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.nm-quota-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
}

.nm-quota-detail {
    border-top: 1px solid rgba(60, 60, 67, 0.08);
    padding: 10px 12px 12px;
}

.nm-quota-detail[hidden] {
    display: none !important;
}

.nm-quota-detail-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--ios-text-secondary);
}

.nm-quota-detail-item {
    margin: 0;
}

.nm-quota-detail-item--usage {
    color: rgba(60, 60, 67, 0.72);
}

.nm-quota-detail-empty {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--ios-text-tertiary, rgba(60, 60, 67, 0.45));
}

.nm-quota-detail-redeem {
    padding-top: 2px;
}

.nm-sheet-quota strong,
.nm-sheet-quota-value {
    color: #1a8f47;
    font-weight: 600;
}

.nm-sheet-redeem {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.nm-redeem-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nm-redeem-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(60, 60, 67, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    color: var(--ios-text-main);
    box-sizing: border-box;
}

body.dark-theme.naming-page .nm-quota-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme.naming-page .nm-quota-detail {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme.naming-page .nm-quota-detail-item--usage {
    color: rgba(223, 231, 255, 0.58);
}

body.dark-theme.naming-page .nm-redeem-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f5f5f7;
}

.nm-redeem-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-width: 52px;
    margin: 0;
    padding: 7px 10px;
    box-sizing: border-box;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0;
    font-size: 12px;
    line-height: 1;
}

.nm-redeem-tip {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
}

.nm-redeem-tip.is-ok {
    color: #1a8f47;
}

.nm-redeem-tip.is-err {
    color: #c0392b;
}

.nm-sheet-label {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--ios-text-secondary);
}

.nm-sheet-label-hint {
    letter-spacing: 0.04em;
    font-weight: 400;
    opacity: 0.85;
}

/* 起名风格 4×3，与名字字数按钮同尺寸 */
.nm-style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.nm-style-grid .nm-style-btn {
    height: var(--nm-control-h);
    min-height: var(--nm-control-h);
    padding: 0 2px;
    font-size: 10px;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.nm-source-grid {
    margin-bottom: 8px;
}

.nm-source-grid--reserved {
    margin-bottom: 16px;
}

.nm-source-grid .nm-source-btn {
    font-size: 10px;
    letter-spacing: 0.02em;
}

.nm-source-btn--reserved:not(.active) {
    opacity: 0.72;
}

.nm-sheet-label--spaced {
    margin-top: 14px;
}

.nm-length-toggle {
    margin-bottom: 16px;
}

.nm-length-toggle .gender-toggle-btn {
    height: var(--nm-control-h);
    min-height: var(--nm-control-h);
    padding: 0 4px;
    font-size: 13px;
    letter-spacing: 0.08em;
    box-sizing: border-box;
}

.nm-switch-list {
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
}

.nm-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    font-size: 14px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.nm-switch-row--multiline {
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
}

.nm-switch-row-text {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: var(--ios-text-main);
}

.nm-switch-note {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--ios-text-secondary);
    letter-spacing: 0.01em;
    font-weight: 400;
}

.nm-pref-xiyong-block {
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
}

.nm-pref-select-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

.nm-pref-select-label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    letter-spacing: 0.02em;
    color: var(--ios-text-main);
}

.nm-pref-select {
    flex-shrink: 0;
    min-width: 72px;
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: var(--ios-text-main);
    background: rgba(255, 255, 255, 0.65);
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.nm-pref-xiyong-block .nm-switch-row:last-child {
    border-bottom: none;
}

.nm-switch-row:last-child {
    border-bottom: none;
}

.nm-switch {
    appearance: none;
    -webkit-appearance: none;
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: rgba(120, 120, 128, 0.22);
    position: relative;
    cursor: pointer;
    outline: none;
}

.nm-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.nm-switch:checked {
    background: var(--ios-text-main);
}

.nm-switch:checked::after {
    transform: translateX(18px);
}

body.dark-theme .nm-switch:checked {
    background: #2b3344;
}

.nm-notes-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.nm-sheet-textarea {
    width: 100%;
    box-sizing: border-box;
    border: none;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 14px;
    min-height: 68px;
    resize: vertical;
    background: rgba(0, 0, 0, 0.05);
    color: var(--ios-text-main);
    outline: none;
    font-family: inherit;
}

.nm-notes-dual .nm-sheet-textarea {
    min-height: 72px;
    font-size: 13px;
}

.nm-sheet-textarea--extra {
    margin-top: 10px;
    min-height: 72px;
    font-size: 13px;
}

/* 高级偏好 Sheet — 暗色模式 */
body.dark-theme.naming-page .nm-sheet-panel {
    background: rgba(24, 28, 38, 0.98);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

body.dark-theme.naming-page .nm-sheet-grabber {
    background: rgba(255, 255, 255, 0.22);
}

body.dark-theme.naming-page .nm-sheet-title {
    color: #eef3ff;
}

body.dark-theme.naming-page .nm-sheet-done {
    color: #8fd4a8;
}

body.dark-theme.naming-page .nm-sheet-quota {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(223, 231, 255, 0.78);
}

body.dark-theme.naming-page .nm-sheet-quota strong,
body.dark-theme.naming-page .nm-sheet-quota-value {
    color: #6ecf93;
}

body.dark-theme.naming-page .nm-sheet-redeem-label {
    color: rgba(223, 231, 255, 0.78);
}

body.dark-theme.naming-page .nm-sheet-label {
    color: rgba(223, 231, 255, 0.72);
}

body.dark-theme.naming-page .nm-sheet-label-hint {
    color: rgba(223, 231, 255, 0.55);
}

body.dark-theme.naming-page .nm-switch-list,
body.dark-theme.naming-page .nm-pref-xiyong-block {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-theme.naming-page .nm-switch-row,
body.dark-theme.naming-page .nm-pref-select-row {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme.naming-page .nm-switch-row-text,
body.dark-theme.naming-page .nm-pref-select-label {
    color: #eef3ff;
}

body.dark-theme.naming-page .nm-switch-note {
    color: rgba(223, 231, 255, 0.62);
}

body.dark-theme.naming-page .nm-pref-select {
    background: rgba(255, 255, 255, 0.1);
    color: #eef3ff;
}

body.dark-theme.naming-page .nm-pref-select option {
    background: #1c2030;
    color: #eef3ff;
}

body.dark-theme.naming-page .nm-sheet-textarea {
    background: rgba(255, 255, 255, 0.08);
    color: #eef3ff;
}

body.dark-theme.naming-page .nm-sheet-textarea::placeholder {
    color: rgba(223, 231, 255, 0.38);
}

body.dark-theme.naming-page .nm-style-grid .gender-toggle-btn,
body.dark-theme.naming-page .nm-length-toggle .gender-toggle-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #eef3ff !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

body.dark-theme.naming-page .nm-style-grid .gender-toggle-btn.active,
body.dark-theme.naming-page .nm-length-toggle .gender-toggle-btn.active {
    background: #3d5169 !important;
    color: #eef3ff !important;
    border-color: #5a7494 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

body.dark-theme.naming-page .nm-switch {
    background: rgba(120, 120, 128, 0.38);
}

body.dark-theme.naming-page .nm-switch::after {
    background: #eef3ff;
}

body.dark-theme.naming-page .nm-switch:checked {
    background: #4a6280;
}

body.dark-theme.naming-page .nm-redeem-tip.is-ok {
    color: #6ecf93;
}

body.dark-theme.naming-page .nm-redeem-tip.is-err {
    color: #ff9a8b;
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    body.dark-theme.naming-page .nm-sheet-panel {
        box-shadow:
            0 16px 48px rgba(0, 0, 0, 0.55),
            0 0 0 1px rgba(255, 255, 255, 0.08);
    }
}

.nm-wx-picker-row {
    display: flex;
    gap: 8px;
    padding: 6px 18px 16px;
}

.nm-wx-pick {
    flex: 1 1 0;
    min-height: 54px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    background: var(--nm-wx-bg, #ececec);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    color: rgba(27, 31, 42, 0.88);
}

.nm-wx-pick:active {
    transform: scale(0.97);
}

.nm-wx-pick--on {
    box-shadow: inset 0 0 0 2px rgba(27, 31, 42, 0.32);
}

body.nm-sheet-open {
    overflow: hidden;
}

.nm-step.nm-step-entering {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* —— 存图导出（屏外渲染 · 直角 · 无透明边） —— */
@font-face {
    font-family: 'Ma Shan Zheng';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/fontsource/fonts/ma-shan-zheng@5.2.5/chinese-simplified-400-normal.woff2') format('woff2');
}

.nm-export-host {
    position: fixed;
    left: -10000px;
    top: 0;
    width: 360px;
    pointer-events: none;
    z-index: -1;
    opacity: 1;
}

.nm-export-card {
    width: 360px;
    box-sizing: border-box;
    padding: 26px 22px 20px;
    --nm-paper-base: #f0e6c8;
    --nm-paper-warm: #e8d9b0;
    --nm-paper-edge: rgba(168, 132, 68, 0.22);
    --nm-ink-main: #3d2f1a;
    --nm-ink-soft: #5c4a32;
    --nm-gold: #c6a035;
    --nm-gold-light: #e2c56a;
    background-color: var(--nm-paper-base);
    background-image:
        radial-gradient(1.1px 1.1px at 8% 14%, rgba(212, 175, 55, 0.72) 0%, transparent 100%),
        radial-gradient(0.9px 0.9px at 22% 68%, rgba(198, 160, 56, 0.58) 0%, transparent 100%),
        radial-gradient(1.3px 1.3px at 35% 28%, rgba(226, 197, 106, 0.65) 0%, transparent 100%),
        radial-gradient(0.8px 0.8px at 48% 82%, rgba(184, 134, 11, 0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 61% 18%, rgba(212, 175, 55, 0.62) 0%, transparent 100%),
        radial-gradient(1.2px 1.2px at 74% 56%, rgba(198, 160, 56, 0.55) 0%, transparent 100%),
        radial-gradient(0.7px 0.7px at 86% 34%, rgba(226, 197, 106, 0.48) 0%, transparent 100%),
        radial-gradient(1px 1px at 92% 78%, rgba(184, 134, 11, 0.52) 0%, transparent 100%),
        radial-gradient(0.9px 0.9px at 16% 42%, rgba(212, 175, 55, 0.45) 0%, transparent 100%),
        radial-gradient(1.1px 1.1px at 55% 44%, rgba(198, 160, 56, 0.42) 0%, transparent 100%),
        radial-gradient(ellipse 130% 90% at 50% -10%, rgba(255, 249, 235, 0.72) 0%, transparent 58%),
        radial-gradient(ellipse 90% 70% at 100% 100%, rgba(210, 180, 120, 0.18) 0%, transparent 52%),
        linear-gradient(168deg, #f8f0dc 0%, #f0e6c8 38%, #e8d9b0 100%);
    border-radius: 0;
    border: 1px solid var(--nm-paper-edge);
    box-shadow: inset 0 0 0 1px rgba(255, 248, 230, 0.35);
    color: var(--nm-ink-main);
    font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", sans-serif;
}

.nm-export-card__ribbon {
    height: 3px;
    margin: 0 0 22px;
    border-radius: 0;
    background: linear-gradient(
        90deg,
        rgba(198, 160, 56, 0.82) 0%,
        rgba(226, 197, 106, 0.55) 45%,
        rgba(240, 230, 200, 0) 100%
    );
}

.nm-export-name-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.nm-export-mizi {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 0;
    border: 1.5px solid rgba(168, 132, 68, 0.38);
    background: rgba(255, 252, 245, 0.55);
    box-shadow: inset 0 0 0 1px rgba(226, 197, 106, 0.12);
    overflow: hidden;
}

.nm-export-mizi-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    --nm-export-ln: rgba(120, 90, 48, 0.18);
    background:
        linear-gradient(90deg, transparent calc(50% - 0.4px), var(--nm-export-ln) 0, var(--nm-export-ln) calc(50% + 0.4px), transparent 0),
        linear-gradient(0deg, transparent calc(50% - 0.4px), var(--nm-export-ln) 0, var(--nm-export-ln) calc(50% + 0.4px), transparent 0),
        linear-gradient(45deg, transparent 49.55%, var(--nm-export-ln) 49.55%, var(--nm-export-ln) 50.45%, transparent 50.45%),
        linear-gradient(-45deg, transparent 49.55%, var(--nm-export-ln) 49.55%, var(--nm-export-ln) 50.45%, transparent 50.45%);
}

.nm-export-mizi-char {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', '楷体', serif;
    font-size: 52px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    color: #2c2112;
    transform: translateY(-1px);
}

.nm-export-section {
    margin-top: 14px;
}

.nm-export-label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 11px;
    border-radius: 0;
    background: rgba(198, 160, 56, 0.18);
    border: 1px solid rgba(168, 132, 68, 0.22);
    color: #6b4e12;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.nm-export-text {
    margin: 0;
    padding: 12px 13px;
    border-radius: 0;
    background: rgba(255, 252, 245, 0.52);
    border: 1px solid rgba(168, 132, 68, 0.14);
    font-size: 13px;
    line-height: 1.72;
    letter-spacing: 0.04em;
    color: #4a3820;
}

.nm-export-foot {
    display: flex;
    justify-content: center;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(168, 132, 68, 0.2);
}

.nm-export-foot-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nm-export-qrcode {
    width: 48px;
    height: 48px;
    border-radius: 0;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.nm-export-logo {
    width: 48px;
    height: 48px;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: none;
}

.nm-export-brand-wrap {
    text-align: left;
}

.nm-export-brand {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #3d2f1a;
}

.nm-export-site {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(74, 56, 32, 0.62);
}

@media (min-width: 769px) {
    .nm-submit-btn {
        padding: 0 52px !important;
        font-size: 14px !important;
    }
}

/* 电脑端：高级偏好 / 喜用选择 — 居中浮层，非底部抽屉 */
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    body.naming-page .nm-sheet {
        align-items: center;
        justify-content: center;
        padding: 24px;
    }

    body.naming-page .nm-sheet-panel {
        width: min(100%, 320px);
        max-width: 320px;
        max-height: min(72vh, 560px);
        border-radius: 18px;
        padding-top: 6px;
        box-shadow:
            0 12px 40px rgba(0, 0, 0, 0.12),
            0 0 0 1px rgba(60, 60, 67, 0.08);
        transform: translateY(8px) scale(0.97);
        opacity: 0;
        transition:
            transform 0.28s cubic-bezier(0.32, 0.72, 0, 1),
            opacity 0.24s ease;
    }

    body.naming-page .nm-sheet-nav {
        padding: 20px 20px 14px;
    }

    body.naming-page .nm-sheet-title,
    body.naming-page .nm-sheet-done {
        padding-top: 2px;
    }

    body.naming-page .nm-sheet-scroll {
        padding-top: 4px;
    }

    body.naming-page .nm-sheet.nm-sheet--open .nm-sheet-panel {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    body.naming-page .nm-sheet-panel--wx {
        max-height: none;
        padding-bottom: 12px;
    }

    body.naming-page .nm-sheet-grabber {
        display: none;
    }

    body.naming-page .nm-sheet-backdrop {
        background: rgba(0, 0, 0, 0.22);
    }
}
