:root {
    --gold: #d3bc8e;
    --gold-strong: #f4e8d1;
    --gold-soft: rgba(211, 188, 142, 0.18);
    --text-main: #ece5d8;
    --text-soft: rgba(236, 229, 216, 0.84);
    --text-muted: rgba(236, 229, 216, 0.62);
    --bg-main: #0a0a0f;
    --card-bg: rgba(18, 18, 36, 0.78);
    --card-border: rgba(211, 188, 142, 0.18);
    --shadow-main: 0 24px 90px rgba(0, 0, 0, 0.45);
    --shadow-gold: 0 0 30px rgba(211, 188, 142, 0.4);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-pill: 999px;
    --success: #f5dca8;
    --warning: #c6b18a;
    --error: #b8d3ff;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.summon-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.page-shell {
    position: relative;
    z-index: 2;
    width: min(100%, 480px);
    min-height: 100vh;
    padding: 14px 16px 24px;
}

.space-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(43, 29, 66, 0.98) 0%, rgba(10, 10, 15, 1) 100%);
    opacity: 0.96;
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    mix-blend-mode: screen;
}

.nebula-left {
    top: -50px;
    left: -60px;
    width: 280px;
    height: 280px;
    background: rgba(93, 65, 144, 0.42);
}

.nebula-right {
    top: 36%;
    right: -60px;
    width: 220px;
    height: 220px;
    background: rgba(70, 50, 120, 0.34);
}

.nebula-bottom {
    bottom: -100px;
    left: 18%;
    width: 320px;
    height: 320px;
    background: rgba(88, 56, 128, 0.48);
}

.star {
    position: absolute;
    border-radius: 50%;
    background: rgba(236, 229, 216, 0.86);
    box-shadow: 0 0 10px rgba(236, 229, 216, 0.52);
    animation: twinkle 4s ease-in-out infinite;
}

.star-1 { top: 12%; left: 10%; width: 4px; height: 4px; }
.star-2 { top: 18%; left: 78%; width: 5px; height: 5px; }
.star-3 { top: 28%; left: 62%; width: 3px; height: 3px; }
.star-4 { top: 40%; left: 14%; width: 5px; height: 5px; }
.star-5 { top: 52%; left: 84%; width: 3px; height: 3px; }
.star-6 { top: 66%; left: 22%; width: 4px; height: 4px; }
.star-7 { top: 74%; left: 72%; width: 5px; height: 5px; }
.star-8 { top: 82%; left: 48%; width: 4px; height: 4px; }
.star-9 { top: 24%; left: 42%; width: 4px; height: 4px; }
.star-10 { top: 60%; left: 50%; width: 3px; height: 3px; }

@keyframes twinkle {
    0%, 100% { opacity: 0.25; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.1); }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-main);
    backdrop-filter: blur(18px);
}

.top-chrome {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 4px 0 8px;
    backdrop-filter: blur(8px);
}

.top-row {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.resource-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.resource-pill {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.46);
    border: 1px solid rgba(211, 188, 142, 0.28);
}

.resource-pill-highlight {
    box-shadow: 0 0 22px rgba(211, 188, 142, 0.12);
}

.resource-pill-plain {
    border-color: rgba(244, 232, 209, 0.16);
}

.resource-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.gold-dot {
    background: rgba(211, 188, 142, 0.18);
    color: var(--gold);
}

.ready-dot {
    background: rgba(244, 232, 209, 0.14);
    color: var(--gold-strong);
}

.resource-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.resource-label {
    color: rgba(236, 229, 216, 0.64);
    font-size: 12px;
    line-height: 1.2;
}

.resource-value {
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.tabs-row {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 12px;
}

.tab-item {
    position: relative;
    border: none;
    background: transparent;
    color: rgba(236, 229, 216, 0.6);
    font-size: 18px;
    padding: 0 0 10px;
}

.tab-item.active {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(211, 188, 142, 0.55);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.main-stage {
    position: relative;
    min-height: calc(100vh - 148px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 94px;
    padding-bottom: 170px;
}

.hero-layer,
.info-layer,
.action-area {
    position: relative;
    width: 100%;
}

.cards-zone {
    position: relative;
    width: 306px;
    height: 306px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.fate-ring,
.stack-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.ring-outer {
    width: 360px;
    height: 360px;
    border: 1px solid rgba(211, 188, 142, 0.14);
    animation: spinSlow 40s linear infinite;
}

.ring-inner {
    width: 260px;
    height: 260px;
    border: 1px dashed rgba(211, 188, 142, 0.22);
    animation: spinSlow 24s linear infinite reverse;
}

.ring-primary {
    width: 190px;
    height: 190px;
    border: 2px solid rgba(211, 188, 142, 0.24);
    box-shadow: 0 0 26px rgba(211, 188, 142, 0.10);
    animation: haloPulse 4s ease-in-out infinite;
}

.ring-secondary {
    width: 230px;
    height: 230px;
    border: 1px solid rgba(211, 188, 142, 0.10);
    opacity: 0.82;
    animation: haloPulse 4.8s ease-in-out infinite reverse;
}

.cards-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(211, 188, 142, 0.22) 0%, rgba(211, 188, 142, 0.08) 48%, transparent 72%);
    filter: blur(36px);
}

@keyframes haloPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.35; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.9; }
}

@keyframes spinSlow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.stack-card {
    position: absolute;
    width: 145px;
    height: 198px;
    border-radius: 18px;
    background: linear-gradient(135deg, #16162d, #3c2a5e);
    border: 1px solid rgba(211, 188, 142, 0.32);
    box-shadow: 0 0 30px rgba(211, 188, 142, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 720ms cubic-bezier(0.2, 0.72, 0.2, 1), opacity 420ms ease, box-shadow 420ms ease;
    transform-style: preserve-3d;
}

.stack-card-inner {
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 14px;
    border: 1px solid rgba(211, 188, 142, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-card {
    transform: rotate(-15deg) translate(-44px, -8px) scale(0.93);
    opacity: 0.78;
}

.front-card {
    transform: rotate(4deg) translate(22px, 8px) scale(1.03);
    border-color: rgba(244, 232, 209, 0.40);
    box-shadow: 0 24px 54px rgba(8, 12, 26, 0.58), 0 0 38px rgba(211, 188, 142, 0.22), inset 0 0 18px rgba(255, 244, 214, 0.08);
}

.cards-zone.success-state .back-card {
    opacity: 0.12;
    transform: rotate(-6deg) translate(-16px, -4px) scale(0.88);
}

.cards-zone.success-state .front-card {
    transform: translate(0, 0) rotateY(360deg) scale(1.34);
    box-shadow: 0 28px 70px rgba(8, 12, 26, 0.62), 0 0 52px rgba(211, 188, 142, 0.34), inset 0 0 24px rgba(255, 244, 214, 0.14);
}

.card-icon {
    color: rgba(211, 188, 142, 0.52);
    font-size: 48px;
}

.gem-wrap {
    position: relative;
    width: 92px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gem-glow {
    position: absolute;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 232, 209, 0.48) 0%, rgba(211, 188, 142, 0.12) 58%, transparent 76%);
    filter: blur(12px);
    animation: gemPulse 3s ease-in-out infinite;
}

@keyframes gemPulse {
    0%, 100% { transform: scale(0.92); opacity: 0.6; }
    50% { transform: scale(1.06); opacity: 1; }
}

.gem-diamond {
    position: absolute;
    transform: rotate(45deg);
    border-radius: 8px;
}

.gem-outer {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(255, 247, 226, 0.98) 0%, rgba(219, 190, 128, 0.94) 54%, rgba(163, 124, 62, 0.98) 100%);
    box-shadow: 0 0 28px rgba(211, 188, 142, 0.52);
}

.gem-inner {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, rgba(255, 254, 249, 1) 0%, rgba(244, 232, 209, 0.96) 100%);
}

.gem-core {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff6e7;
    box-shadow: 0 0 18px rgba(255, 246, 231, 0.96);
}

.title-plaque {
    margin: 10px auto 0;
    padding: 22px 22px 18px;
    width: 100%;
    max-width: 360px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plaque-line {
    width: 100%;
    height: 1px;
    margin-bottom: 14px;
    background: linear-gradient(90deg, transparent, rgba(211, 188, 142, 0.85), transparent);
}

.plaque-kicker {
    color: var(--gold-strong);
    font-size: 11px;
    letter-spacing: 4px;
}

.plaque-title {
    display: block;
    margin-top: 10px;
    color: var(--gold-strong);
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 3px;
}

.plaque-desc {
    display: block;
    margin-top: 8px;
    color: rgba(236, 229, 216, 0.92);
    font-size: 15px;
    text-align: center;
}

.status-panel {
    width: 100%;
    max-width: 360px;
    margin: 10px auto 0;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 16px currentColor;
}

.status-ready .status-dot,
.status-idle .status-dot,
.status-success .status-dot {
    color: var(--gold);
    background: var(--gold);
}

.status-loading .status-dot {
    color: #e6dcc5;
    background: #e6dcc5;
}

.status-error .status-dot {
    color: var(--error);
    background: var(--error);
}

.status-title {
    color: var(--gold-strong);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.status-copy {
    color: rgba(236, 229, 216, 0.82);
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

.status-ready,
.status-idle,
.status-success {
    border-color: rgba(211, 188, 142, 0.24);
    background: rgba(18, 18, 36, 0.84);
}

.status-loading {
    border-color: rgba(244, 232, 209, 0.22);
    background: rgba(18, 18, 36, 0.88);
}

.status-error {
    border-color: rgba(143, 183, 255, 0.28);
    background: rgba(16, 20, 36, 0.88);
}

.action-area {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 12;
}

.action-glow {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 150px;
    background: linear-gradient(to top, rgba(211, 188, 142, 0.08), transparent);
}

.button-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

.action-button-wrap {
    padding: 0 34px;
}

.primary-button,
.secondary-button,
.mini-button {
    border: none;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease, background 140ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.mini-button:hover {
    transform: translateY(-1px);
}

.primary-button {
    width: 100%;
    max-width: 320px;
    min-height: 58px;
    padding: 0 28px;
    background: linear-gradient(180deg, #f4e8d1 0%, #d3bc8e 100%);
    color: #3e2e1a;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: var(--shadow-gold);
}

.secondary-button {
    width: 100%;
    max-width: 240px;
    min-height: 46px;
    padding: 0 24px;
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-main);
    border: 1px solid rgba(211, 188, 142, 0.28);
    font-size: 15px;
    font-weight: 600;
}

.mini-button {
    min-height: 42px;
    padding: 0 18px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--text-main);
    border: 1px solid rgba(211, 188, 142, 0.18);
    font-size: 14px;
    font-weight: 600;
}

.quota-line,
.invite-hint-line {
    margin-top: 10px;
    text-align: center;
}

.quota-text {
    color: rgba(236, 229, 216, 0.72);
    font-size: 13px;
    letter-spacing: 1px;
}

.quota-strong {
    color: var(--gold);
    font-weight: 700;
}

.invite-hint-text {
    color: rgba(236, 229, 216, 0.52);
    font-size: 13px;
}

.invite-entry-wrap {
    margin-top: 14px;
    padding: 0 62px;
}

.invite-entry-button {
    max-width: 260px;
}

.panel-stage {
    padding-top: 120px;
    padding-bottom: 34px;
}

.panel-card {
    width: 100%;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(211, 188, 142, 0.12);
    color: var(--gold-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-strong);
    text-align: center;
}

.section-desc {
    color: var(--text-soft);
    line-height: 1.8;
    text-align: center;
}

.welfare-preview-list,
.history-list,
.settings-grid {
    width: 100%;
    display: grid;
    gap: 14px;
}

.daka-bind-card {
    margin-bottom: 18px;
}

.team-bind-qr-box {
    width: 240px;
    height: 240px;
    margin: 0 auto 0.85rem;
    border: 1px solid rgba(211, 188, 142, 0.18);
    border-radius: 18px;
    background: rgba(255,255,255,0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.team-bind-qr-box canvas,
.team-bind-qr-box img {
    max-width: 100%;
    max-height: 100%;
}

.team-bind-status-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.9rem;
    text-align: center;
}

.team-bind-status-text.success {
    color: var(--success);
}

.team-bind-status-text.error {
    color: #fca5a5;
}

.welfare-count-card {
    width: 100%;
    padding: 20px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(211, 188, 142, 0.18);
    text-align: center;
}

.welfare-count-label {
    display: block;
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 10px;
}

.welfare-count-value {
    color: var(--gold-strong);
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
}

.welfare-preview-item,
.history-item,
.settings-card,
.public-link-card,
.stat-card {
    width: 100%;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(211, 188, 142, 0.16);
}

.welfare-preview-title,
.history-item-title,
.settings-title,
.link-title {
    display: block;
    color: var(--gold-strong);
    font-size: 18px;
    font-weight: 700;
}

.welfare-preview-desc,
.history-item-note,
.settings-note,
.link-note,
.field-help {
    display: block;
    color: var(--text-soft);
    line-height: 1.7;
    font-size: 14px;
}

.history-item-top,
.public-link-head,
.settings-head,
.inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.history-item-meta,
.history-empty,
.empty-note,
.profile-meta {
    color: var(--text-muted);
    font-size: 13px;
}

.history-state-badge {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(211, 188, 142, 0.14);
    color: #f1dfb8;
    font-size: 12px;
    font-weight: 700;
}

.daka-stats-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--gold-strong);
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--gold-strong);
    font-size: 14px;
    font-weight: 700;
}

.form-input,
.form-textarea {
    width: 100%;
    border: 1px solid rgba(211, 188, 142, 0.18);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.24);
    color: var(--text-main);
    padding: 12px 14px;
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(236, 229, 216, 0.36);
}

.form-input:focus,
.form-textarea:focus {
    border-color: rgba(211, 188, 142, 0.42);
    box-shadow: 0 0 0 4px rgba(211, 188, 142, 0.08);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.switch-label {
    color: var(--text-soft);
    font-size: 14px;
}

.switch {
    position: relative;
    width: 48px;
    height: 28px;
}

.switch input {
    display: none;
}

.switch-ui {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(244, 232, 209, 0.14);
}

.switch-ui::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-main);
    top: 3px;
    left: 3px;
    transition: transform 180ms ease;
}

.switch input:checked + .switch-ui {
    background: rgba(211, 188, 142, 0.28);
    border-color: rgba(211, 188, 142, 0.34);
}

.switch input:checked + .switch-ui::after {
    transform: translateX(20px);
    background: var(--gold-strong);
}

.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 20, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 40;
    backdrop-filter: blur(14px);
}

.dialog-overlay.show {
    display: flex;
}

.dialog-card {
    width: min(100%, 420px);
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dialog-close,
.qr-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 28px;
}

.qr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 20, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50;
    backdrop-filter: blur(14px);
}

.qr-modal-overlay.show {
    display: flex;
}

.qr-modal-card {
    width: min(100%, 420px);
    padding: 24px;
    position: relative;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-main);
}

.qr-modal-subtitle,
.qr-status,
.dialog-desc {
    color: var(--text-soft);
    line-height: 1.7;
}

.qr-box {
    margin: 16px auto 10px;
    width: 260px;
    height: 260px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    border: 1px solid rgba(244, 232, 209, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-box img,
.wechat-qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
}

.qr-spinner,
.spinning {
    animation: qrSpin 0.9s linear infinite;
}

.qr-spinner {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 3px solid rgba(211, 188, 142, 0.14);
    border-top-color: var(--gold);
}

@keyframes qrSpin {
    to {
        transform: rotate(360deg);
    }
}

.wechat-entry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(211, 188, 142, 0.22);
    background: rgba(0, 0, 0, 0.24);
    color: var(--text-main);
}

.wechat-entry-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.wechat-entry-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(211, 188, 142, 0.16);
}

.wechat-entry-name {
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-header-tools {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.toast {
    position: fixed;
    top: 16px;
    right: 16px;
    max-width: calc(100vw - 32px);
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(18, 18, 36, 0.96);
    color: var(--text-main);
    border: 1px solid rgba(211, 188, 142, 0.18);
    box-shadow: var(--shadow-main);
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 60;
}

.toast.show {
    display: inline-flex;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

@media (max-width: 420px) {
    .page-shell {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .resource-group {
        gap: 8px;
    }

    .resource-pill {
        padding: 10px;
    }

    .tabs-row {
        gap: 16px;
    }

    .main-stage {
        padding-top: 108px;
        padding-bottom: 190px;
    }

    .cards-zone {
        width: 280px;
        height: 280px;
    }

    .stack-card {
        width: 126px;
        height: 172px;
    }

    .title-plaque,
    .status-panel {
        max-width: 100%;
    }

    .action-button-wrap {
        padding: 0 24px;
    }

    .invite-entry-wrap {
        padding: 0 50px;
    }

    .daka-stats-grid,
    .inline-row {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .public-link-head,
    .settings-head,
    .history-item-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

:root {
    --gold: #8fb3ff;
    --gold-strong: #eef4ff;
    --gold-soft: rgba(143, 179, 255, 0.18);
    --text-main: #eef4ff;
    --text-soft: rgba(223, 232, 248, 0.84);
    --text-muted: rgba(223, 232, 248, 0.58);
    --bg-main: #080c16;
    --card-bg: rgba(14, 20, 36, 0.82);
    --card-border: rgba(143, 179, 255, 0.16);
    --shadow-main: 0 24px 90px rgba(0, 0, 0, 0.45);
    --shadow-gold: 0 0 30px rgba(143, 179, 255, 0.26);
    --success: #b8d3ff;
    --warning: #9bb3de;
    --error: #ffb4b4;
}

.bg-gradient {
    background: radial-gradient(circle at center, rgba(22, 30, 52, 0.98) 0%, rgba(8, 12, 22, 1) 100%);
    opacity: 0.98;
}

.nebula-left { background: rgba(86, 118, 200, 0.28); }
.nebula-right { background: rgba(72, 102, 176, 0.22); }
.nebula-bottom { background: rgba(64, 84, 148, 0.30); }

.resource-pill {
    background: rgba(7, 12, 24, 0.54);
    border-color: rgba(143, 179, 255, 0.22);
}

.resource-pill-highlight { box-shadow: 0 0 22px rgba(143, 179, 255, 0.10); }
.resource-pill-plain { border-color: rgba(214, 226, 255, 0.12); }
.gold-dot { background: rgba(143, 179, 255, 0.16); color: #b8d3ff; }
.ready-dot { background: rgba(214, 226, 255, 0.12); color: #e8f0ff; }
.tab-item.active { color: #b8d3ff; text-shadow: 0 0 10px rgba(143, 179, 255, 0.42); }
.tab-item.active::after { background: linear-gradient(90deg, transparent, #8fb3ff, transparent); }

.ring-outer { border-color: rgba(143, 179, 255, 0.12); }
.ring-inner { border-color: rgba(143, 179, 255, 0.20); }
.ring-primary { border-color: rgba(143, 179, 255, 0.22); box-shadow: 0 0 26px rgba(143, 179, 255, 0.10); }
.ring-secondary { border-color: rgba(143, 179, 255, 0.08); }
.cards-glow { background: radial-gradient(circle, rgba(143, 179, 255, 0.20) 0%, rgba(143, 179, 255, 0.07) 48%, transparent 72%); }
.stack-card { background: linear-gradient(135deg, #11192d, #243455); border-color: rgba(143, 179, 255, 0.26); box-shadow: 0 0 30px rgba(143, 179, 255, 0.14); }
.stack-card-inner { border-color: rgba(143, 179, 255, 0.20); }
.front-card { border-color: rgba(214, 226, 255, 0.34); box-shadow: 0 24px 54px rgba(8, 12, 26, 0.58), 0 0 38px rgba(143, 179, 255, 0.18), inset 0 0 18px rgba(214, 226, 255, 0.08); }
.card-icon { color: rgba(143, 179, 255, 0.46); }
.gem-glow { background: radial-gradient(circle, rgba(214, 226, 255, 0.44) 0%, rgba(143, 179, 255, 0.12) 58%, transparent 76%); }
.gem-outer { background: linear-gradient(135deg, rgba(242, 247, 255, 0.98) 0%, rgba(170, 196, 255, 0.94) 54%, rgba(88, 124, 214, 0.98) 100%); box-shadow: 0 0 28px rgba(143, 179, 255, 0.46); }
.gem-inner { background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(229, 238, 255, 0.96) 100%); }
.gem-core { background: #f4f8ff; box-shadow: 0 0 18px rgba(232, 240, 255, 0.96); }

.hero-qr-card {
    width: 100%;
    max-width: 360px;
    margin: 10px auto 0;
    padding: 22px 22px 18px;
    border-radius: 28px;
    background: rgba(12, 18, 32, 0.74);
    border: 1px solid rgba(143, 179, 255, 0.14);
}

.hero-qr-badge {
    margin-bottom: 12px;
    background: rgba(143, 179, 255, 0.12);
}

.hero-qr-title {
    display: block;
    color: #eef4ff;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
}

.hero-qr-box {
    margin-top: 16px;
    width: 220px;
    height: 220px;
    border-radius: 24px;
    border: 1px solid rgba(143, 179, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.hero-qr-status {
    margin-top: 14px;
    margin-bottom: 0;
}

.hero-qr-tip {
    margin: 10px 0 0;
    color: var(--text-soft);
    line-height: 1.7;
    text-align: center;
    font-size: 14px;
}

.hero-qr-actions {
    margin-top: 14px;
}

.title-plaque {
    border-radius: 28px;
    background: rgba(12, 18, 32, 0.74);
    border: 1px solid rgba(143, 179, 255, 0.14);
}

.status-ready .status-dot,
.status-idle .status-dot,
.status-success .status-dot { color: #8fb3ff; background: #8fb3ff; }
.status-loading .status-dot { color: #dbe8ff; background: #dbe8ff; }
.status-title { color: #eef4ff; }
.status-copy { color: rgba(223, 232, 248, 0.78); }
.status-ready,
.status-idle,
.status-success { border-color: rgba(143, 179, 255, 0.20); background: rgba(12, 18, 32, 0.84); }
.status-loading { border-color: rgba(214, 226, 255, 0.20); background: rgba(12, 18, 32, 0.88); }
.action-glow { background: linear-gradient(to top, rgba(143, 179, 255, 0.08), transparent); }

.primary-button {
    background: linear-gradient(180deg, #eef4ff 0%, #8fb3ff 100%);
    color: #1a2642;
}

.secondary-button,
.mini-button,
.wechat-entry {
    background: rgba(7, 12, 24, 0.40);
    border-color: rgba(143, 179, 255, 0.22);
}

.quota-strong { color: #b8d3ff; }

.panel-card,
.history-item,
.stat-card {
    border-color: rgba(143, 179, 255, 0.14);
}

.badge {
    background: rgba(143, 179, 255, 0.12);
}

.history-state-badge {
    background: rgba(143, 179, 255, 0.14);
    color: #d9e7ff;
}

.wechat-entry {
    gap: 10px;
}

.wechat-entry-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(143, 179, 255, 0.12);
    color: #d9e7ff;
    font-size: 11px;
    line-height: 1;
    flex-shrink: 0;
}

.history-header-tools {
    margin-bottom: 6px;
}

@media (max-width: 420px) {
    .hero-qr-card,
    .status-panel {
        max-width: 100%;
    }

    .hero-qr-box {
        width: 200px;
        height: 200px;
    }

    .hero-qr-title {
        font-size: 34px;
    }
}
