/* --- 装备列表内的小图标 --- */
.lego-eq-icon {
    display: inline-block;
    width: 14px; height: 14px;
    vertical-align: middle;
    margin-right: 2px;
    border-radius: 2px;
}
.lego-eq-icon.wpn-sword { background: linear-gradient(135deg, #cfd8dc, #90a4ae); width: 3px; border-radius: 1px; }
.lego-eq-icon.wpn-dagger { background: #78909c; width: 2px; border-radius: 1px; }
.lego-eq-icon.wpn-staff { background: linear-gradient(180deg, #8d6e63, #5d4037); width: 3px; border-radius: 1px; }
.lego-eq-icon.wpn-shield { background: #5d4037; border: 1px solid #ffb300; width: 10px; height: 12px; }
.lego-eq-icon.wpn-helmet { background: #78909c; border-radius: 50% 50% 2px 2px; }
.lego-eq-icon.wpn-crown { background: #ffb300; clip-path: polygon(0% 100%,0% 30%,20% 0%,40% 25%,60% 0%,80% 25%,100% 0%,100% 30%,100% 100%); }
.lego-eq-icon.wpn-armor { background: rgba(120,144,156,0.8); border-radius: 2px; }
.lego-eq-icon.wpn-robe { background: linear-gradient(180deg, rgba(25,118,210,0.6), rgba(25,118,210,0.9)); }
.lego-eq-icon.wpn-cap { background: #e53935; border-radius: 50% 50% 2px 2px; }
.lego-eq-icon.wpn-amulet { background: #ffb300; width: 6px; height: 6px; border-radius: 50%; }
.lego-eq-icon.wpn-badge { background: #ffb300; width: 8px; height: 8px; border-radius: 50%; }
.lego-eq-icon.wpn-pendant { background: #7b1fa2; width: 6px; height: 8px; border-radius: 50%; }
.lego-eq-icon.wpn-axe { background: #90a4ae; width: 8px; height: 6px; clip-path: polygon(20% 0%,80% 0%,100% 40%,90% 100%,10% 100%,0% 40%); }
.lego-eq-icon.wpn-bow { background: #8d6e63; width: 2px; height: 14px; border-radius: 50%; }
.lego-eq-icon.wpn-spear { background: #b0bec5; width: 2px; height: 14px; border-radius: 1px; }
.lego-eq-icon.wpn-wand { background: #ffb300; width: 6px; height: 6px; border-radius: 50%; }
.lego-eq-icon.wpn-mount { font-size: 12px; width: auto; height: auto; background: none; }
.lego-eq-icon.wpn-cape { background: linear-gradient(180deg, rgba(156,39,176,0.7), rgba(156,39,176,0.5)); width: 8px; height: 14px; border-radius: 0 0 4px 4px; }

/* --- 装备穿戴样式微调 --- */
/* 有头部装备时隐藏头发 */
.lego-figure.has-headgear .lego-hair { display: none; }

/* 已穿戴（全宽：列宽弹性拉伸填满整行，auto-fit 让空格位也均分宽度） */
.equipped-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: var(--space-sm);
}
.equipped-slot {
    border: 1px solid var(--border-color, #eee);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}
.slot-name { font-size: 0.8rem; color: var(--text-light, #999); margin-bottom: 6px; }
.slot-item { font-weight: 600; }
.slot-item.rarity-blue { color: #4a90d9; }
.slot-item.rarity-purple { color: #9b59b6; }
.slot-item.rarity-orange { color: #e67e22; }
.slot-attr { font-size: 0.75rem; color: var(--text-light, #888); margin-top: 4px; }
.slot-empty { color: #ccc; }

/* 背包 / 商店 */
.inventory-grid, .shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 150px);
    gap: var(--space-sm);
    justify-content: center;
}
.inv-card {
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border-color, #eee);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
}
.inv-card.rarity-blue { border-color: #4a90d9; }
.inv-card.rarity-purple { border-color: #9b59b6; }
.inv-card.rarity-orange { border-color: #e67e22; }
.inv-sprite { font-size: 2rem; }
.inv-name { font-weight: 600; font-size: 0.9rem; margin: 4px 0; }
.inv-meta { font-size: 0.72rem; color: var(--text-light, #999); margin-bottom: 6px; }
.inv-actions { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-top: auto; }
/* 已穿戴栏与背包的装备操作按钮统一尺寸 */
.equip-actions .btn-small {
    box-sizing: border-box;
    flex: 0 0 56px;
    width: 56px;
    height: 32px;
    min-height: 32px;
    padding: 4px 8px;
    font-size: var(--text-xs);
}

/* 家长端 */
.notif-banner {
    display: flex; justify-content: space-between; align-items: center;
    background: #fdf0e5; border: 1px solid #e6a23c;
    border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
    font-size: 0.9rem;
}
.notif-email_error { background: #fdeaea; border-color: #e74c3c; }
.parent-child-card {
    border: 1px solid var(--border-color, #eee);
    border-radius: 12px; padding: 14px; margin-bottom: 10px;
}
.pcc-head { font-size: 1.05rem; margin-bottom: 6px; }
.pcc-stats { color: var(--text-light, #888); font-size: 0.88rem; }
.pcc-actions { margin-top: 8px; display: flex; gap: 8px; }
.review-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
}
.review-name { flex: 1; font-weight: 500; }
.review-actions { display: flex; gap: 6px; }

.wish-admin-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wish-grid {
    display: grid;
    /* 手机端（<480px）用弹性列宽，一屏能放下两列；大屏由下方断点覆盖为固定列宽 */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-sm);
    justify-content: center;
}
/* 心愿商店分类标签栏 */
.wish-cat-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}
.wish-cat-tab {
    padding: 6px 16px;
    border: 1.5px solid var(--border-color, #ddd);
    border-radius: 20px;
    background: var(--bg-card, #fff);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text, #333);
}
.wish-cat-tab:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
}
.wish-cat-tab.active {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}
/* 分类分组标签 */
.wish-cat-section {
    grid-column: 1 / -1;
    margin-bottom: var(--space-md);
}
.wish-cat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light, #666);
    padding: 4px 0 8px 4px;
    border-bottom: 1px solid var(--border-color, #eee);
    margin-bottom: 8px;
}
.wish-cat-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-sm);
    justify-content: center;
}
.wish-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px 14px;
    border: 1px solid var(--border-color, #eee);
    border-radius: 8px;
    background: var(--bg-card, #fff);
}
.wish-card.wish-inactive { opacity: 0.5; }
.wish-off-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-weight: 500;
    border-radius: 4px;
    background: var(--border-light, #f0f0f0);
    color: var(--text-light, #999);
    vertical-align: middle;
}
.wish-card .wish-title { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wish-card .wish-meta { font-size: 0.78rem; color: var(--text-light, #999); white-space: nowrap; flex-shrink: 0; }
.wish-card .wish-actions { display: flex; gap: 6px; flex-shrink: 0; }
/* 手机端心愿商店管理：卡片加大间距，卡片内标题独占一行，
   金币/类型信息与操作按钮分列第二行两端，不再挤在一起 */
@media (max-width: 767px) {
    /* 心愿管理页三个栏目卡片拉开间距 + 标题下加分隔线，
       栏目边界清晰、不再贴在一起（基础 .card 手机端 margin-bottom 仅 12px） */
    #page-parent > .card { margin-bottom: var(--space-xl); }
    #page-parent > .card:last-child { margin-bottom: var(--space-md); }
    #page-parent .card-title {
        padding-bottom: var(--space-sm);
        border-bottom: 1px solid var(--border-light, #f0f0f0);
    }
    .wish-admin-grid { gap: 12px; }
    .wish-card {
        flex-wrap: wrap;
        gap: 6px 8px;
        padding: 12px 14px;
        border-radius: 10px;
    }
    .wish-card .wish-title {
        flex: 1 1 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-break: break-all;
    }
    .wish-card .wish-meta { white-space: normal; align-self: center; }
    .wish-card .wish-actions { margin-left: auto; }
}
.wish-item-card button:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---- 家长赠送礼物 ---- */
.wish-gift-order { background: #fdf6ff; border-radius: 8px; padding-left: 8px; }
.wish-gift-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #7c3aed;
    background: #f3e8ff;
    border: 1px solid #ddd6fe;
    border-radius: 999px;
    white-space: nowrap;
}
.wish-gift-msg {
    margin: -6px 0 8px;
    padding-left: 4px;
    font-size: 0.85rem;
    color: #a855f7;
}
/* 心愿订单/心愿中心表格里的明细小字（寄语、心愿卡抵扣等） */
.wish-order-sub {
    margin-top: 2px;
    font-size: 0.78rem;
    color: #a855f7;
    word-break: break-all;
}

/* 心愿订单表格：字体比通用 kp-table 放大一档；
   排版参考 lt-table——短文本列一律 nowrap 防逐字竖排换行，心愿列弹性占宽 */
#wishOrders { font-size: var(--text-base); }
#wishOrders th { font-size: var(--text-sm); white-space: nowrap; }
#wishOrders td { padding: 10px 8px; }
#wishOrders .wo-child { white-space: nowrap; font-weight: 600; }
#wishOrders .wo-wish { min-width: 180px; line-height: 1.5; }
#wishOrders .wo-cost { white-space: nowrap; }
#wishOrders .wo-status { white-space: nowrap; }
#wishOrders .wo-status .task-badge { display: inline-block; white-space: nowrap; }
#wishOrders .wo-time { white-space: nowrap; font-size: var(--text-sm); color: var(--text-secondary); }
#wishOrders .wc-optional { white-space: nowrap; }
#wishOrders .wo-actions { white-space: nowrap; }
#wishOrders .wo-actions .btn-small { white-space: nowrap; flex-shrink: 0; }
#wishOrders .wish-order-sub { font-size: 0.85rem; }
/* 时间列双格式：桌面显示完整时间（.t-full），手机卡片显示短日期（.t-brief） */
.t-brief { display: none; }

/* 手机端：心愿订单表格 → 卡片列表（每单一卡：孩子+状态顶行，心愿占一行，金额/时间/操作底行） */
@media (max-width: 767px) {
    #wishOrders, #wishOrders tbody { display: block; }
    #wishOrders thead { display: none; }
    #wishOrders tbody tr {
        display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
        background: var(--bg-card, #fff);
        border: 1px solid var(--border, #eee);
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    #wishOrders tbody tr:hover { background: var(--bg-card, #fff); }
    #wishOrders tbody tr.empty-row { border: none; background: transparent; padding: 0; }
    #wishOrders td { border-bottom: none; padding: 0; }
    #wishOrders .empty-row td { flex: 1; }
    #wishOrders .t-full { display: none; }
    #wishOrders .t-brief { display: inline; }
    #wishOrders .wo-child { order: 1; font-size: var(--text-sm); }
    #wishOrders .wo-status { order: 2; margin-left: auto; }
    #wishOrders .wo-wish { order: 3; flex: 0 0 100%; min-width: 0; }
    #wishOrders .wo-cost { order: 4; }
    #wishOrders .wo-time { order: 5; font-size: var(--text-xs); color: var(--text-secondary); }
    #wishOrders .wo-none { display: none; }
    #wishOrders .wo-actions { order: 6; margin-left: auto; gap: 6px; }
    #wishOrders .wo-actions .btn-small { padding: 5px 12px; font-size: var(--text-xs); }
}

/* ---- 赠送礼物弹窗（与心愿类型选择器同风格） ---- */
.gift-child-selector {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.gift-child-option {
    flex: 1; min-width: 90px; display: flex; flex-direction: column; align-items: center;
    padding: 10px 6px; border: 2px solid var(--border-color, #ddd);
    border-radius: 10px; cursor: pointer; transition: all .2s;
    background: #fff; user-select: none;
}
.gift-child-icon { font-size: 1.5rem; line-height: 1.3; }
.gift-child-name { font-size: 0.85rem; font-weight: 600; margin-top: 2px; }
.gift-child-meta { font-size: 0.7rem; color: var(--text-light, #999); }
.gift-wish-selector {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
    max-height: 230px; overflow-y: auto; padding: 2px;
}
.gift-wish-option {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border: 2px solid var(--border-color, #ddd);
    border-radius: 10px; cursor: pointer; transition: all .2s;
    background: #fff; user-select: none; min-width: 0;
}
.gift-wish-icon { font-size: 1.3rem; flex-shrink: 0; }
.gift-wish-info { min-width: 0; display: flex; flex-direction: column; }
.gift-wish-title { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gift-wish-meta { font-size: 0.72rem; color: var(--text-light, #999); }
.gift-child-option:hover, .gift-wish-option:hover { border-color: #7c3aed; background: #f5f3ff; }
.gift-child-option.active, .gift-wish-option.active {
    border-color: #7c3aed; background: #ede9fe;
    box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.wish-preview-card .wish-gift-badge { margin-left: 0; }
.wish-gift-preview-msg {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #a855f7;
    min-height: 1em;
    word-break: break-all;
}

/* ---- 心愿模板库弹窗 ---- */
.template-modal-content { max-width: 720px !important; }
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-sm);
    padding: 8px 0;
    max-height: 55vh;
    overflow-y: auto;
}
.template-card {
    border: 1.5px solid var(--border-color, #ddd);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    background: var(--bg-card, #fff);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}
.template-card.template-imported { opacity: 0.5; }
.template-sprite { font-size: 2rem; line-height: 1.3; }
.template-title { font-weight: 600; font-size: 0.88rem; }
.template-meta { font-size: 0.75rem; color: var(--text-light, #999); }
.template-desc { font-size: 0.72rem; color: var(--text-light, #999); min-height: 2em; }

/* ---- 心愿编辑弹窗优化 ---- */
.wish-modal-content { max-width: 680px !important; }
.wish-form-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
    align-items: start;
}
.wish-form-left { min-width: 0; }
.wish-form-left .input-group { margin-bottom: var(--space-md); }
.wish-form-left .input-group label { font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; display: block; color: var(--text); }
.wish-form-left .input-group input {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--border-color, #ddd); border-radius: 8px;
    font-size: 0.95rem; transition: border-color .2s;
}
.wish-form-left .input-group input:focus {
    outline: none; border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.wish-form-left .form-row { margin-bottom: 0; }
.wish-form-right {
    display: flex; flex-direction: column; align-items: center;
    padding: 12px; background: #fafafa; border-radius: 12px;
    border: 1px dashed var(--border-color, #ddd);
}

/* 类型选择器 */
.wish-type-selector {
    display: flex; gap: 8px;
}
.wish-type-option {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 10px 6px; border: 2px solid var(--border-color, #ddd);
    border-radius: 10px; cursor: pointer; transition: all .2s;
    background: #fff; user-select: none;
}
.wish-type-option:hover { border-color: #7c3aed; background: #f5f3ff; }
.wish-type-option.active {
    border-color: #7c3aed; background: #ede9fe;
    box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.wish-type-icon { font-size: 1.6rem; line-height: 1.3; }
.wish-type-label { font-size: 0.85rem; font-weight: 600; margin-top: 2px; }
.wish-type-desc { font-size: 0.7rem; color: var(--text-light, #999); margin-top: 1px; }

/* 价格参考提示 */
.wish-price-hint { font-size: 0.78rem; color: var(--text-light); margin-top: 4px; }
.wish-price-ref { display: inline; }

/* 实时预览卡片 */
.wish-preview-card {
    background: #fff; border: 1px solid var(--border-color, #eee);
    border-radius: 10px; padding: 14px; text-align: center;
    width: 100%; max-width: 180px;
}
.wish-preview-sprite { font-size: 2.8rem; line-height: 1.2; margin-bottom: 4px; }
.wish-preview-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; word-break: break-all; }
.wish-preview-cost { font-size: 0.78rem; color: var(--text-light, #999); margin-bottom: 8px; }
/* 心愿中心（孩子端合并表格 + 明细弹窗） */
#wishCenterTable .task-badge { white-space: nowrap; }
#wishCenterTable td .btn-small { margin-right: 4px; }
.wish-detail-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 8px 0; border-bottom: 1px dashed var(--border, #eee);
    font-size: 0.9rem;
}
.wish-detail-row:last-child { border-bottom: none; }
.wish-detail-row > span { color: var(--text-light, #999); flex-shrink: 0; }
.wish-detail-row > b { font-weight: 600; text-align: right; word-break: break-all; }

/* 许愿/编辑弹窗（孩子端） */
.wish-propose-modal {
    max-width: 480px;
    padding: 0;
    overflow: hidden;
}
.wish-propose-hero {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 55%, #ec4899 100%);
    color: #fff;
    text-align: center;
    padding: 28px 24px 22px;
}
.wish-propose-emoji { font-size: 2.6rem; line-height: 1.2; }
.wish-propose-title { font-size: 1.35rem; font-weight: 800; margin-top: 4px; }
.wish-propose-sub { font-size: 0.82rem; opacity: 0.9; margin-top: 6px; }
.wish-propose-body { padding: var(--space-xl); }
.wish-propose-body .input-group { margin-bottom: var(--space-lg); }
.wish-propose-body .input-group > label {
    display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; color: var(--text, #333);
}
.wish-propose-body input[type="text"],
.wish-propose-body textarea {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px; border: 2px solid var(--border-color, #e5e0f0); border-radius: 10px;
    font-size: 0.95rem; font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.wish-propose-body input[type="text"]:focus,
.wish-propose-body textarea:focus {
    outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}
.wish-propose-body textarea { resize: vertical; min-height: 72px; }
.wish-propose-actions { display: flex; gap: 10px; margin-top: 4px; }
.wish-propose-actions .btn-cancel,
.wish-propose-actions .btn-confirm { flex: 1; padding: 12px; font-size: 1rem; border-radius: 10px; }

/* 手机端：弹窗放宽、心愿中心表格 → 卡片列表（每单一卡：心愿+状态顶行，金币/时间/操作底行） */
@media (max-width: 767px) {
    .wish-propose-modal { max-width: 100%; }
    .wish-propose-hero { padding: 20px 16px 16px; }
    .wish-propose-body { padding: var(--space-md); }
    /* 类型/兑现列隐藏，下单时间列以短日期保留 */
    #wishCenterTable .wc-optional, #wishOrders .wc-optional { display: none; }
    #wishCenterTable .wc-optional.wc-time { display: block; }
    #wishCenterTable, #wishCenterTable tbody { display: block; }
    #wishCenterTable thead { display: none; }
    #wishCenterTable tbody tr {
        display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
        background: var(--bg-card, #fff);
        border: 1px solid var(--border, #eee);
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    #wishCenterTable tbody tr:hover { background: var(--bg-card, #fff); }
    #wishCenterTable tbody tr.empty-row { border: none; background: transparent; padding: 0; }
    #wishCenterTable td { border-bottom: none; padding: 0; }
    #wishCenterTable .empty-row td { flex: 1; }
    #wishCenterTable .t-full { display: none; }
    #wishCenterTable .t-brief { display: inline; }
    #wishCenterTable .wc-title { order: 1; flex: 1; min-width: 0; font-weight: 600; word-break: break-all; }
    #wishCenterTable .wc-status { order: 2; }
    #wishCenterTable .wc-coins { order: 3; }
    #wishCenterTable .wc-time { order: 4; font-size: var(--text-xs); color: var(--text-secondary); }
    #wishCenterTable .wc-actions { order: 5; margin-left: auto; }
    #wishCenterTable .wc-actions .btn-small { margin-right: 0; margin-left: 6px; }
}

/* 许愿和惩罚 sheet：左右并排双列（容器中性，塔罗风格在卡片上） */
.wish-penalty-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.duo-col {
    border-radius: 14px;
    padding: 14px 16px;
    background: var(--bg, #fafafa);
    border: 1px solid var(--border-color, #eee);
}
.duo-title { font-weight: 700; font-size: 1rem; margin-bottom: 12px; }
.duo-sub { font-size: .78rem; font-weight: 400; opacity: .75; margin-left: 6px; }

/* ============ 天使卡（塔罗图背景 tarot_angel.png，宽高比 7:12） ============ */
.proposal-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}
.proposal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    aspect-ratio: 7 / 12;
    padding: 26px 16px 14px;
    border-radius: 10px;
    text-align: center;
    background: url("/static/img/tarot_angel.png") center / cover no-repeat;
    box-shadow: 0 6px 16px rgba(160, 130, 70, .25);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.proposal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(160, 130, 70, .35);
}
/* 光环：金环 + 外发光托起心愿图标 */
.angel-halo {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #fffdf6, #f3e7c3);
    box-shadow: 0 0 0 2px rgba(201, 168, 106, .8), 0 0 14px rgba(212, 175, 55, .5);
}
.angel-icon { font-size: 1.45rem; }
.proposal-card-title {
    font-family: "Songti SC", "STSong", "SimSun", serif;
    font-weight: 700;
    font-size: 1.02rem;
    color: #6b4f23;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(255, 252, 240, .9);
}
.proposal-card-desc {
    font-size: .74rem;
    color: #8a6d3b;
    text-shadow: 0 1px 2px rgba(255, 252, 240, .8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* 卡尾信息 + 按钮组：半透奶油底衬，压在牌面文字区上保证可读 */
.proposal-card-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    margin-top: auto;
    background: rgba(251, 247, 236, .88);
    border-radius: 8px;
    padding: 3px 10px;
}
.proposal-card .proposal-child { font-weight: 600; color: #8a6d3b; }
.proposal-card .proposal-date { color: #b49b6e; }
/* 审批/拒绝按钮等大同样式：均分卡宽、同一尺寸、塔罗金风 */
.proposal-card-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    background: rgba(251, 247, 236, .88);
    border-radius: 8px;
    padding: 6px;
}
.proposal-card-actions .btn-small {
    flex: 1;
    margin: 0;
    padding: 7px 0;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 2px;
}
.proposal-card-actions .btn-primary {
    background: linear-gradient(180deg, #d9b878, #c19a52);
    border: 1px solid #a8854a;
    color: #fffbef;
    text-shadow: 0 1px 1px rgba(120, 90, 40, .4);
}
.proposal-card-actions .btn-primary:hover { background: linear-gradient(180deg, #e2c48a, #c9a45c); }
.proposal-card-actions .btn-cancel {
    background: transparent;
    border: 1px solid #c9a86a;
    color: #8a6d3b;
}
.proposal-card-actions .btn-cancel:hover { background: rgba(201, 168, 106, .15); }

/* ============ 恶魔卡（塔罗图背景 tarot_devil.png，宽高比 7:12） ============ */
.penalty-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}
.penalty-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    aspect-ratio: 7 / 12;
    /* 金额靠上（避开牌面顶部罗马数字区），用量贴卡底 */
    padding: 56px 16px 14px;
    border: none;
    border-radius: 10px;
    background: url("/static/img/tarot_devil.png") center / cover no-repeat;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 18px rgba(239, 68, 68, .15);
    transition: transform .15s, box-shadow .15s;
}
.penalty-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .6), 0 0 26px rgba(239, 68, 68, .35);
}
.penalty-item:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.penalty-item-amount {
    font-family: "Songti SC", "STSong", "SimSun", serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #e8c9a8;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
.penalty-item-usage {
    font-size: .68rem;
    color: #d8a0a0;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(150, 55, 55, .5);
    border-radius: 999px;
    padding: 2px 10px;
    margin-top: auto;
}

@media (max-width: 767px) {
    .wish-penalty-duo { grid-template-columns: 1fr; }
}
#approveProposalDesc {
    max-height: 80px; overflow-y: auto; white-space: pre-wrap; line-height: 1.5;
}

/* 内联许愿表单（孩子端"我要许愿"） */
.propose-inline-form {
    background: var(--bg, #f8f9fa);
    border: 1px solid var(--border, #eee);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.propose-inline-form .input-group {
    margin-bottom: 12px;
}
.propose-inline-form .input-group label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
    display: block;
    color: var(--text);
}
.propose-inline-form .input-group input,
.propose-inline-form .input-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border, #ddd);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
}
.propose-inline-form .input-group input:focus,
.propose-inline-form .input-group textarea:focus {
    border-color: #7c3aed;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.propose-inline-form .wish-type-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.propose-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

/* 小屏适配（≤767px） */
@media (max-width: 767px) {
    .wish-form-layout { grid-template-columns: 1fr; }
    .wish-form-right { display: none; }
    .wish-type-selector { flex-direction: column; }
}

.setting-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.setting-row label { flex: 0 0 180px; font-size: 0.9rem; color: #555; }
/* 平板/桌面（≥768px）：设置网格 */
@media (min-width: 768px) {
    .settings-grid hr,
    .settings-grid .notif-banner,
    .settings-grid .setting-row:last-child { grid-column: 1 / -1; }
}
.setting-row input[type="text"], .setting-row input[type="number"], .setting-row input[type="password"], .setting-row input[type="time"],
.setting-row select {
    flex: 1; padding: 8px; border: 1px solid var(--border-color, #ddd); border-radius: 8px;
}
.setting-row hr { width: 100%; border: none; border-top: 1px solid var(--border-color, #eee); }

/* 收件家长行（邮件设置） */
.recipient-row .recipient-flag { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; font-size: 0.85rem; }

/* 参数配置标签页 */
.config-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-color, #e2e8f0); margin-bottom: var(--space-lg); }
.config-tab { padding: 10px 24px; border: none; background: none; cursor: pointer; font-size: 0.95rem; color: var(--text-light); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.config-tab:hover { color: var(--primary, #667eea); }
.config-tab.active { color: var(--primary, #667eea); border-bottom-color: var(--primary, #667eea); font-weight: 600; }
.config-panel { display: none; }
.config-panel.active { display: block; }
.config-panel .setting-row .btn-primary { width: auto; }
.config-panel .setting-row .btn-cancel { width: auto; }

/* 模板库按钮 */
.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
    padding: 6px 12px; border-radius: 8px; font-size: 0.82rem; font-weight: 500;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
    background: transparent; color: var(--primary, #667eea);
    border: 1.5px solid var(--primary, #667eea);
}
.btn-outline:hover { background: var(--primary, #667eea); color: #fff; }
.btn-outline.btn-compact { padding: 4px 10px; font-size: 0.78rem; }

/* AI 档案卡片 */
.ai-profile-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: var(--space-md); margin-bottom: var(--space-sm);
}
.ai-profile-header {
    display: flex; align-items: center; gap: var(--space-sm);
    margin-bottom: 4px; flex-wrap: wrap;
}
.ai-profile-header strong { font-size: var(--text-base); }
.ai-profile-meta {
    font-size: 0.8rem; color: var(--text-secondary); margin-bottom: var(--space-sm);
    display: flex; gap: var(--space-lg); flex-wrap: wrap;
}
.ai-profile-actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; }

/* ==================== 响应式游戏 UI ==================== */

/* 手机端（< 480px）：设置行堆叠 */
@media (max-width: 480px) {
    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .setting-row label {
        flex: none;
        width: 100%;
    }
    .setting-row input[type="text"],
    .setting-row input[type="number"],
    .setting-row input[type="password"],
    .setting-row input[type="time"],
    .setting-row select {
        width: 100%;
    }

    /* 配置标签横向滚动 */
    .config-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .config-tabs::-webkit-scrollbar { display: none; }
    .config-tab {
        padding: 8px 14px;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* 网格尺寸逐级放宽（.equipped-grid 除外：装备位全宽弹性，由基础规则统一控制） */
@media (min-width: 480px) {
    .inventory-grid, .shop-grid {
        grid-template-columns: repeat(auto-fill, 140px);
    }
    .wish-grid, .wish-cat-items {
        grid-template-columns: repeat(auto-fill, 170px);
    }
}

@media (min-width: 768px) {
    .inventory-grid, .shop-grid {
        grid-template-columns: repeat(auto-fill, 160px);
    }
    .wish-grid, .wish-cat-items {
        grid-template-columns: repeat(auto-fill, 200px);
    }
}

@media (min-width: 1280px) {
    .inventory-grid, .shop-grid {
        grid-template-columns: repeat(auto-fill, 180px);
    }
    .wish-grid, .wish-cat-items {
        grid-template-columns: repeat(auto-fill, 220px);
    }
}

@media (min-width: 1600px) {
    .inventory-grid, .shop-grid {
        grid-template-columns: repeat(auto-fill, 200px);
    }
    .wish-grid, .wish-cat-items {
        grid-template-columns: repeat(auto-fill, 240px);
    }
}

