
/* Wallet Korean Minimalist Style */
#wallet-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 20000; /* Above everything */
    display: none;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #000;
}

/* Header */
.wallet-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: #fff;
    position: relative;
}

.wallet-back-btn {
    font-size: 24px;
    cursor: pointer;
    color: #000;
}

.wallet-user-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wallet-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
    object-fit: cover;
}

.wallet-username {
    font-size: 16px;
    font-weight: 600;
}

/* Content */
.wallet-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 80px; /* Space for bottom bar */
}

/* Asset Card */
.wallet-card {
    background-color: #333333; /* Dark Gray */
    color: #ffffff;
    border-radius: 24px;
    padding: 30px 24px;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.wallet-card-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 10px;
    font-weight: 300;
}

.wallet-card-amount {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.wallet-card-row {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.wallet-card-col {
    flex: 1;
}

.wallet-card-col-label {
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 4px;
}

.wallet-card-col-value {
    font-size: 18px;
    font-weight: 600;
}

/* Transactions Section */
.wallet-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wallet-section-title {
    font-size: 20px;
    font-weight: 700;
}

.wallet-filter-group {
    display: flex;
    gap: 8px;
}

.wallet-filter-btn {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    background: #f5f5f5;
    color: #999;
    border: none;
    transition: all 0.2s;
}

.wallet-filter-btn.active {
    background: #000;
    color: #fff;
}

/* Transaction List */
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-item {
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.wallet-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wallet-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.wallet-item-subtitle {
    font-size: 12px;
    color: #666;
}

.wallet-item-date {
    font-size: 12px;
    color: #999;
}

.wallet-item-right {
    text-align: right;
}

.wallet-amount-income {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.wallet-amount-expense {
    font-size: 18px;
    font-weight: 700;
    color: #000; /* Minimalist style often uses black for everything, maybe just minus sign distinguishes */
}

.wallet-empty {
    text-align: center;
    color: #ccc;
    padding: 40px 0;
    font-size: 14px;
}

/* Bottom Tab Bar */
.wallet-tab-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 10px; /* Safe area */
}

.wallet-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #ccc;
    cursor: pointer;
    flex: 1;
    height: 100%;
}

.wallet-tab-item.active {
    color: #000;
}

.wallet-tab-icon {
    font-size: 20px;
}

.wallet-tab-text {
    font-size: 10px;
    font-weight: 600;
}

.wallet-page {
    width: 100%;
}

.wallet-content.family-mode {
    background: #F5F6F8;
}

.wallet-family-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.wallet-family-block {
    width: 100%;
}

.wallet-family-group-title {
    font-size: 13px;
    color: #888888;
    margin-bottom: 12px;
}

.wallet-family-received-list {
    display: flex;
    flex-direction: column;
}

.wallet-family-sent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.wallet-family-empty {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B2B2B2;
    font-size: 14px;
}

.wallet-family-received-card {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 16px;
    margin-bottom: 16px;
    padding: 20px;
    color: #FFFFFF;
}

.wallet-family-received-card::before,
.wallet-family-received-card::after {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.28);
    opacity: 0.1;
    transform: rotate(45deg);
    pointer-events: none;
}

.wallet-family-received-card::before {
    right: -64px;
    top: 10px;
}

.wallet-family-received-card::after {
    right: -10px;
    top: 54px;
}

.wallet-family-received-top {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.wallet-family-received-icon {
    width: 18px;
    height: 18px;
    position: relative;
    flex: 0 0 auto;
}

.wallet-family-received-icon::before,
.wallet-family-received-icon::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1.6px solid rgba(255, 255, 255, 0.92);
    transform: rotate(45deg);
    left: 1px;
    top: 1px;
}

.wallet-family-received-icon::after {
    left: 5px;
    top: -3px;
    opacity: 0.8;
}

.wallet-family-received-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
}

.wallet-family-received-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.wallet-family-received-label {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.1;
}

.wallet-family-received-amount {
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}

.wallet-family-received-currency {
    font-size: 18px;
    font-weight: 700;
    opacity: 0.95;
}

.wallet-family-received-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wallet-family-send-card {
    width: 100%;
    border: none;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #333333;
    text-align: left;
}

.wallet-family-send-card:active {
    transform: scale(0.99);
}

.wallet-family-send-text {
    font-size: 16px;
    color: #333333;
    font-weight: 500;
}

.wallet-family-send-arrow {
    color: #CCCCCC;
    font-size: 18px;
    line-height: 1;
}

.wallet-family-sent-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wallet-family-sent-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.wallet-family-sent-title {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-family-sent-subtitle {
    font-size: 12px;
    color: #666;
}

.wallet-family-sent-amount {
    font-size: 16px;
    font-weight: 800;
    color: #111;
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.wallet-family-picker-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 23800;
    animation: workFadeIn 150ms ease-out forwards;
}

.wallet-family-picker-sheet {
    width: 100%;
    max-width: 520px;
    background: rgba(255,255,255,0.96);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -18px 44px rgba(0,0,0,0.18);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    padding: 14px 14px 16px;
    gap: 12px;
}

.wallet-family-picker-title {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    color: #111;
}

.wallet-family-picker-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 42vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px;
}

.wallet-family-picker-item {
    border: none;
    background: #fff;
    border-radius: 16px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.wallet-family-picker-item.is-selected {
    box-shadow: 0 0 0 2px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
}

.wallet-family-picker-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wallet-family-picker-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    background: #f5f5f5;
    flex: 0 0 auto;
}

.wallet-family-picker-name {
    font-size: 14px;
    font-weight: 800;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-family-picker-action {
    height: 44px;
    border-radius: 16px;
    border: none;
    background: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.wallet-family-picker-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wallet-family-amount-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 23900;
    animation: workFadeIn 150ms ease-out forwards;
}

.wallet-family-amount-card {
    width: min(320px, calc(100% - 44px));
    border-radius: 20px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 18px 44px rgba(0,0,0,0.18);
    backdrop-filter: blur(10px);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-family-amount-title {
    font-size: 16px;
    font-weight: 900;
    color: #111;
    text-align: center;
}

.wallet-family-amount-input {
    height: 44px;
    border-radius: 14px;
    border: none;
    background: rgba(0,0,0,0.06);
    padding: 0 12px;
    font-size: 16px;
    outline: none;
    font-variant-numeric: tabular-nums;
}

.wallet-family-amount-hint {
    font-size: 12px;
    color: #888;
    text-align: center;
}

.wallet-family-amount-actions {
    display: flex;
    gap: 10px;
}

.wallet-family-amount-btn {
    flex: 1 1 0;
    height: 44px;
    border-radius: 16px;
    border: none;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.wallet-family-amount-btn.primary {
    background: #000;
    color: #fff;
}

.wallet-family-amount-btn.ghost {
    background: rgba(0,0,0,0.06);
    color: #111;
}

.work-page-head {
    padding: 4px 2px 16px 2px;
}

.work-page-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #000;
}

.work-page-subtitle {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
    color: #333;
}

.work-role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.work-role-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 20px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 240px;
    cursor: pointer;
}

.work-role-card:active {
    transform: scale(0.99);
}

.work-role-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    background: #f5f5f5;
    object-fit: cover;
}

.work-role-name {
    font-size: 16px;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.2px;
}

.work-role-status {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: #333;
    min-height: 16px;
}

.work-role-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.work-progress {
    width: 100%;
    height: 6px;
    background: #f5f5f5;
    border-radius: 999px;
    overflow: hidden;
}

.work-progress-fill {
    height: 100%;
    background: #000;
    width: 0%;
}

.work-countdown {
    font-size: 12px;
    font-weight: 600;
    color: #000;
    letter-spacing: 0.4px;
}

.work-countdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.work-fast-btn {
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #eaeaea;
    background: #fff;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.work-fast-btn:active {
    transform: scale(0.98);
}

.work-envelope-btn {
    width: 100%;
    border: 1px solid #eaeaea;
    background: #fff;
    border-radius: 16px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    color: #000;
}

.work-envelope-btn:active {
    transform: scale(0.98);
}

.work-empty {
    border: 1px solid #eaeaea;
    border-radius: 20px;
    padding: 20px;
    color: #999;
    font-size: 13px;
    font-weight: 400;
    text-align: center;
}

.work-sheet-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 22000;
}

.work-sheet {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 14px 16px 18px 16px;
    transform: translateY(18px);
    animation: workSheetUp 180ms ease-out forwards;
    max-height: 78vh;
    overflow: hidden;
}

.work-sheet-handle {
    width: 44px;
    height: 4px;
    background: #eaeaea;
    border-radius: 999px;
    margin: 2px auto 14px auto;
}

.work-sheet-top {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.work-sheet-role {
    display: flex;
    align-items: center;
    gap: 12px;
}

.work-sheet-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #f5f5f5;
    object-fit: cover;
}

.work-sheet-name {
    font-size: 16px;
    font-weight: 800;
    color: #000;
}

.work-sheet-status {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: #333;
}

.work-sheet-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border: 1px solid #eaeaea;
    border-radius: 18px;
    padding: 12px;
    background: #fff;
}

.work-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.work-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #000;
}

.work-stat-bar {
    width: 100%;
    height: 4px;
    background: #f5f5f5;
    border-radius: 999px;
    overflow: hidden;
}

.work-stat-fill {
    height: 100%;
    width: 0%;
    background: #000;
}

.work-stat-text {
    font-size: 12px;
    font-weight: 400;
    color: #333;
}

.work-sheet-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-btn {
    width: 100%;
    height: 48px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.work-btn:active {
    transform: scale(0.98);
}

.work-btn-primary {
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

.work-btn-ghost {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

.work-job-list-wrap {
    margin-top: 14px;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}

.work-job-list-title {
    font-size: 12px;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
}

.work-job-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 44vh;
    overflow-y: auto;
    padding-right: 2px;
}

.work-job-item {
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.work-job-item:active {
    transform: scale(0.99);
}

.work-job-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.work-job-name {
    font-size: 14px;
    font-weight: 800;
    color: #000;
}

.work-job-meta {
    font-size: 12px;
    font-weight: 400;
    color: #333;
}

.work-job-reco {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    border: 1px solid #eaeaea;
    border-radius: 999px;
    padding: 4px 10px;
}

.work-note-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 23000;
    animation: workFadeIn 150ms ease-out forwards;
}

.work-note-card {
    width: min(320px, calc(100% - 60px));
    background: #FAFAFA;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    padding: 18px 18px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-image:
        radial-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(0, 0, 0, 0.02));
    background-size: 12px 12px, 100% 100%;
    background-position: 0 0, 0 0;
}

.work-note-title {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    letter-spacing: 0.8px;
}

.work-note-photo {
    width: 100%;
}

.work-note-photo-frame {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    background: #fff;
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.06),
        inset 0 8px 18px rgba(0, 0, 0, 0.09);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
    padding: 12px;
    position: relative;
}

.work-note-photo-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 45%),
        radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 55%),
        radial-gradient(circle at 75% 85%, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0) 55%);
    pointer-events: none;
}

.work-note-photo-text {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(250, 250, 250, 0.92);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.10);
    max-width: 100%;
}

.work-note-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.work-note-loading-text {
    font-size: 12px;
    font-weight: 700;
    color: #666;
}

.work-note-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(0, 0, 0, 0.12);
    border-top-color: rgba(0, 0, 0, 0.55);
    animation: workSpin 800ms linear infinite;
    flex: 0 0 auto;
}

.work-note-text {
    font-size: 14px;
    font-weight: 400;
    color: #333;
    line-height: 1.8;
    white-space: pre-wrap;
}

.work-note-luck {
    font-size: 12px;
    font-weight: 900;
    color: #333;
    background: rgba(251, 227, 125, 0.55);
    border-radius: 14px;
    padding: 10px 12px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

.work-note-job {
    font-size: 13px;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.2px;
}

.work-gift-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.work-gift-icon {
    font-size: 24px;
    line-height: 1;
    flex: 0 0 auto;
}

.work-gift-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.work-gift-name {
    font-size: 14px;
    font-weight: 900;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.work-gift-desc {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    line-height: 1.6;
}

.gift-cabinet {
    background: #FDFBF7;
    border-radius: 18px;
    padding: 14px 14px 18px;
    margin: 14px 0 18px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
    opacity: 1;
    transition: opacity 180ms ease;
}

.gift-cabinet-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.gift-cabinet-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.gift-cabinet-arrow {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    font-size: 14px;
    font-weight: 800;
    line-height: 28px;
    padding: 0;
    cursor: pointer;
}

.gift-cabinet-arrow:active {
    transform: translateY(1px);
}

.gift-cabinet-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.gift-cabinet-title {
    font-size: 14px;
    font-weight: 800;
    color: #333;
    letter-spacing: -0.2px;
    min-width: 0;
}

.gift-cabinet-empty {
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
    padding: 6px 2px 14px;
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}

.gift-card {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
}

.gift-card-icon {
    font-size: 40px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
}

.gift-card-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wallet-content.records-mode {
    padding: 0;
    padding-bottom: 80px;
    overflow: hidden;
}

.wallet-records-page {
    height: 100%;
}

.gift-cabinet-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #F0F0F0;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.gift-cabinet-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 10px;
    flex: 0 0 auto;
}

.gift-cabinet-page-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.gift-cabinet-page-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.gift-cabinet-page-switch {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.gift-cabinet-page-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 900;
    color: #333;
    letter-spacing: -0.2px;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.gift-cabinet-page-settings {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.78);
    color: #333;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gift-cabinet-page-settings:active {
    transform: scale(0.98);
}

.gift-cabinet-page-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 90px;
}

.gift-cabinet-page-empty {
    padding: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-align: center;
}

.gift-cabinet-fs {
    position: absolute;
    left: 0;
    right: 0;
    top: 60px;
    bottom: 0;
    padding-top: env(safe-area-inset-top);
    background-color: #F0F0F0;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    z-index: 23500;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.gift-cabinet-fs.show {
    opacity: 1;
    transform: translateY(0);
}

.gift-cabinet-fs-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 10px;
    flex: 0 0 auto;
}

.gift-cabinet-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.gift-cabinet-fs-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.gift-cabinet-fs-switch {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.gift-cabinet-fs-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 900;
    color: #333;
    letter-spacing: -0.2px;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.gift-cabinet-fs-close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.78);
    color: #333;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.gift-cabinet-fs-close:active {
    transform: scale(0.98);
}

.gift-cabinet-fs-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gift-cabinet-fs-empty {
    padding: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-align: center;
}

.gift-cabinet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
}

.gift-cabinet-card {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    padding: 12px;
    cursor: pointer;
}

.gift-cabinet-card:active {
    transform: scale(0.99);
}

.gift-cabinet-card-icon {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    line-height: 1;
}

.gift-cabinet-card-desc {
    flex: 0 0 auto;
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gift-role-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 23600;
    animation: workFadeIn 150ms ease-out forwards;
}

.gift-role-card {
    width: min(360px, calc(100% - 44px));
    max-height: min(520px, calc(100% - 120px));
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 18px 44px rgba(0,0,0,0.18);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.gift-role-title {
    padding: 14px 16px 10px;
    font-size: 14px;
    font-weight: 900;
    color: #333;
    text-align: center;
}

.gift-role-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gift-role-item {
    border: none;
    background: #fff;
    border-radius: 16px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.gift-role-item:active {
    transform: scale(0.99);
}

.gift-role-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
    background: #f5f5f5;
    flex: 0 0 auto;
}

.gift-role-item-name {
    font-size: 14px;
    font-weight: 800;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gift-settings-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 23650;
    animation: workFadeIn 150ms ease-out forwards;
}

.gift-settings-card {
    width: min(320px, calc(100% - 44px));
    border-radius: 20px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 18px 44px rgba(0,0,0,0.18);
    backdrop-filter: blur(10px);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gift-settings-title {
    font-size: 14px;
    font-weight: 900;
    color: #333;
    text-align: center;
    margin-bottom: 2px;
}

.gift-settings-btn {
    height: 44px;
    border-radius: 16px;
    border: none;
    background: #000;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.gift-settings-btn.ghost {
    background: rgba(0,0,0,0.06);
    color: #333;
}

.gift-settings-btn:active {
    transform: scale(0.99);
}

.gift-detail-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 23700;
    animation: workFadeIn 150ms ease-out forwards;
}

.gift-detail-card {
    width: min(360px, calc(100% - 44px));
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(0,0,0,0.18);
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.gift-detail-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.06);
    color: #333;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.gift-detail-close:active {
    transform: scale(0.98);
}

.gift-detail-icon {
    font-size: 64px;
    line-height: 1;
    text-align: center;
    margin-top: 6px;
}

.gift-detail-name {
    font-size: 18px;
    font-weight: 900;
    color: #111;
    text-align: center;
}

.gift-detail-desc {
    font-family: 'LXGW WenKai Lite', 'Ma Shan Zheng', cursive, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    white-space: pre-wrap;
    text-align: center;
    padding: 4px 6px 2px;
}

.diary-text {
    font-family: 'LXGW WenKai Lite', 'Ma Shan Zheng', cursive, sans-serif;
    color: #4a4a4a;
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 1px;
    position: relative;
    padding: 6px 8px;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.diary-text::before,
.diary-text::after {
    position: absolute;
    color: #e0e0e0;
    font-size: 28px;
    line-height: 1;
    pointer-events: none;
}

.diary-text::before {
    content: "“";
    top: -10px;
    left: -6px;
}

.diary-text::after {
    content: "”";
    right: -6px;
    bottom: -14px;
}

.work-note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.work-note-amount {
    font-size: 28px;
    font-weight: 900;
    color: #000;
    letter-spacing: -0.6px;
    flex: 1 1 auto;
    min-width: 0;
}

@keyframes workSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes workSheetUp {
    from { transform: translateY(18px); opacity: 0.9; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes workFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.work-toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    z-index: 26000;
    opacity: 0;
    animation: workToast 1.6s ease forwards;
}

@keyframes workToast {
    0% { opacity: 0; transform: translateX(-50%) translateY(8px); }
    12% { opacity: 1; transform: translateX(-50%) translateY(0); }
    78% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
}

.work-detail-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 24000;
    animation: workFadeIn 150ms ease-out forwards;
}

.work-detail-modal {
    width: min(380px, calc(100% - 44px));
    border-radius: 20px;
    padding: 18px 18px 16px 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
}

.work-detail-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #000000;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.work-detail-close:hover {
    border-color: #000;
    background: #fafafa;
}

.work-detail-close:active {
    transform: scale(0.98);
}

.work-detail-avatar-area {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 6px;
}

.work-detail-avatar-wrap {
    width: 132px;
    height: 132px;
    border-radius: 999px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-detail-avatar-wrap::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 20%, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0) 55%),
        radial-gradient(circle at 70% 85%, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0) 62%);
    filter: blur(0px);
    pointer-events: none;
}

.work-detail-avatar-wrap.blush::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    background: radial-gradient(circle at 55% 70%, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0) 62%);
    pointer-events: none;
}

.work-detail-avatar {
    width: 132px;
    height: 132px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.10);
    /* animation: workBreath 3.6s ease-in-out infinite; */ /* 移除呼吸动画 */
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* 基础弹簧过渡 */
}

.work-detail-avatar:active {
    transform: scale(1.1); /* 手指按住放大 */
}

.work-detail-avatar.is-poking {
    animation: poke-bounce 0.3s ease-out; /* Q弹动画 */
}

@keyframes poke-bounce {
    0%   { transform: scale(1.1); }
    30%  { transform: scale(0.9); }
    60%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.work-detail-name {
    font-size: 18px;
    font-weight: 900;
    color: #000;
    letter-spacing: -0.2px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-detail-status {
    font-size: 11px;
    font-weight: 600;
    color: #000;
    text-align: center;
}

.work-detail-gold {
    font-size: 11px;
    font-weight: 600;
    color: #000;
    text-align: center;
}

.work-detail-stats {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.work-detail-stat {
    width: 100%;
    border-radius: 18px;
    padding: 12px 12px 10px 12px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #eeeeee;
}

.work-detail-stat-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.work-detail-stat-label {
    font-size: 11px;
    font-weight: 800;
    color: #000;
}

.work-detail-stat-value {
    font-size: 11px;
    font-weight: 700;
    color: #000;
    text-align: right;
}

.work-detail-bar {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: #EAEAEA;
    overflow: hidden;
}

.work-detail-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: #000000;
    transition: width 180ms ease-out;
}

.work-detail-luck-fill {
    background: linear-gradient(90deg, #FBE37D, #FFF4B5);
}

.work-detail-luck-bar.full {
    animation: luckGlow 1400ms ease-in-out infinite;
}

.work-detail-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-top: 8px;
}

.work-feed-menu {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: -2px;
}

.work-feed-item {
    height: 46px;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 800;
    color: #000;
}

.work-feed-item:hover {
    border-color: #000;
    background: #fafafa;
}

.work-feed-item:active {
    transform: scale(0.98);
}

.work-feed-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.work-feed-item-name {
    font-size: 12px;
    font-weight: 900;
    color: #000;
}

.work-feed-item-price {
    font-size: 11px;
    font-weight: 800;
    color: #000;
    opacity: 0.75;
}

.work-detail-action {
    height: 52px;
    border-radius: 18px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #000;
}

.work-detail-action:hover {
    border-color: #000;
    background: #fafafa;
}

.work-detail-action:focus-visible {
    outline: 2px solid rgba(0,0,0,0.25);
    outline-offset: 2px;
}

.work-detail-action:active {
    transform: scale(0.98);
}

.work-detail-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.work-detail-action-emoji {
    font-size: 18px;
    line-height: 1;
}

.work-detail-fx-layer {
    position: absolute;
    inset: -30px;
    pointer-events: none;
    z-index: 2;
}

.work-detail-float {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.86);
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
    animation: workFloatUp 1000ms ease-out forwards;
    white-space: nowrap;
}

.work-confirm-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.12);
    z-index: 25000;
}

.work-confirm-card {
    width: min(320px, calc(100% - 60px));
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #eeeeee;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.work-confirm-title {
    font-size: 14px;
    font-weight: 900;
    color: #000;
    letter-spacing: -0.2px;
}

.work-confirm-desc {
    font-size: 12px;
    font-weight: 600;
    color: #000;
    line-height: 1.6;
}

.work-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 2px;
}

.work-confirm-btn {
    height: 44px;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    font-size: 13px;
    font-weight: 800;
    color: #000;
    cursor: pointer;
}

.work-confirm-btn:hover {
    border-color: #000;
    background: #fafafa;
}

.work-confirm-btn:active {
    transform: scale(0.98);
}

.work-confirm-btn-primary {
    border-color: #000;
}

@keyframes workFloatUp {
    from { opacity: 0; transform: translate(-50%, -30%); }
    15% { opacity: 1; }
    to { opacity: 0; transform: translate(-50%, -90%); }
}

@keyframes luckGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(251, 227, 125, 0); }
    50% { box-shadow: 0 0 14px rgba(251, 227, 125, 0.85); }
}

.gift-pool-page {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 23550;
    padding-top: calc(env(safe-area-inset-top) + 6px);
    color: #f6e7d2;
    background-color: #14060b;
    background-image: linear-gradient(180deg, rgba(35, 9, 18, 0.96) 0%, rgba(16, 5, 10, 0.98) 52%, rgba(8, 2, 5, 1) 100%);
    overflow: hidden;
}

.gift-pool-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 193, 106, 0.16), transparent 34%),
        radial-gradient(circle at top right, rgba(255, 120, 160, 0.14), transparent 30%),
        radial-gradient(circle at bottom center, rgba(255, 255, 255, 0.04), transparent 24%);
    pointer-events: none;
    z-index: 0;
}

.gift-pool-page-header,
.gift-pool-page-body {
    position: relative;
    z-index: 1;
}

.gift-pool-page-header {
    padding: 16px 16px 12px;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: flex-end; /* 让内容靠右对齐 */
}

/* 隐藏头像、切换按钮和标题 */
.gift-pool-page-profile,
.gift-pool-page-title {
    display: none !important;
}

.gift-pool-page-avatar {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 24px rgba(0,0,0,0.24);
}

.gift-pool-page-switch,
.gift-pool-page-close {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gift-pool-page-title {
    color: #f7ead9;
    text-shadow: 0 1px 0 rgba(0,0,0,0.28);
}

.gift-pool-page-body {
    padding-bottom: 20px;
}

.gift-pool-page-empty {
    color: rgba(255, 237, 219, 0.78);
}

.gift-pool-page-content {
    display: block;
    padding: 0 14px 18px;
}

.gift-pool-page {
    --gold: #c9a84c;
    --deep: #1a0a12;
    --parchment: #fdf5e8;
}

.gift-pool-shell.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px 20px; /* 减小顶部 padding，让内容上移 */
    font-family: 'Noto Serif SC', serif;
}

.gift-pool-shell .header {
    text-align: center;
    padding: 10px 0 30px; /* 减小顶部 padding，让内容上移 */
}

.gift-pool-shell .header-subtitle {
    font-size: 11px;
    letter-spacing: 6px;
    color: var(--gold);
    margin-bottom: 12px;
    opacity: .8;
}

.gift-pool-shell .header-title {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    color: var(--parchment);
    letter-spacing: 3px;
}

.gift-pool-shell .header-title span {
    color: var(--gold);
}

.gift-pool-shell .header-desc {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(253, 245, 232, .5);
}

.gift-pool-shell .currency-bar {
    background: rgba(253, 245, 232, .04);
    border: 1px solid rgba(201, 168, 76, .2);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.gift-pool-shell .currency-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gift-pool-shell .currency-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff9a9e, #fecfef, #c9a84c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.gift-pool-shell .currency-label {
    font-size: 11px;
    color: rgba(253, 245, 232, .4);
}

.gift-pool-shell .currency-amount {
    font-size: 24px;
    color: var(--gold);
    font-weight: 600;
    line-height: 1;
}

.gift-pool-shell .ask-btn {
    background: rgba(201, 168, 76, .15);
    border: 1px solid rgba(201, 168, 76, .4);
    color: var(--gold);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
}

.gift-pool-shell .rates {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.gift-pool-shell .rate-badge {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    border-radius: 12px;
}

.gift-pool-shell .rate-badge.ssr {
    background: rgba(255, 154, 158, .1);
    border: 1px solid rgba(255, 154, 158, .3);
}

.gift-pool-shell .rate-badge.sr {
    background: rgba(161, 140, 209, .1);
    border: 1px solid rgba(161, 140, 209, .3);
}

.gift-pool-shell .rate-badge.r {
    background: rgba(212, 184, 192, .1);
    border: 1px solid rgba(212, 184, 192, .2);
}

.gift-pool-shell .rate-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.gift-pool-shell .ssr .rate-name {
    color: #fecfef;
}

.gift-pool-shell .sr .rate-name {
    color: #c9a0dc;
}

.gift-pool-shell .r .rate-name {
    color: #d4b8c0;
}

.gift-pool-shell .rate-pct {
    color: rgba(253, 245, 232, .4);
    font-size: 11px;
}

.gift-pool-shell .pull-section {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.gift-pool-shell .pull-btn {
    flex: 1;
    padding: 16px 10px;
    border: none;
    border-radius: 16px;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gift-pool-shell .pull-btn.single {
    background: linear-gradient(135deg, #2d1a22, #3d2030);
    border: 1px solid rgba(201, 168, 76, .3);
    color: var(--parchment);
}

.gift-pool-shell .pull-btn.ten {
    background: linear-gradient(135deg, #3a1520, #5a2035);
    border: 1px solid rgba(201, 168, 76, .5);
    color: var(--parchment);
}

.gift-pool-shell .pull-btn-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.gift-pool-shell .pull-btn-cost {
    font-size: 12px;
    opacity: .6;
}

.gift-pool-shell .pull-btn-cost span {
    color: var(--gold);
    opacity: 1;
}

.gift-pool-shell .history-section {
    margin-top: 10px;
}

.gift-pool-shell .section-title {
    font-size: 11px;
    letter-spacing: 4px;
    color: rgba(201, 168, 76, .6);
    margin-bottom: 14px;
    text-align: center;
}

.gift-pool-shell .pull-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.gift-pool-shell .pull-btn.is-loading::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 8px;
    border-radius: 999px;
    border: 2px solid rgba(255, 246, 235, 0.28);
    border-top-color: rgba(255, 246, 235, 0.95);
    animation: workSpin 0.9s linear infinite;
    vertical-align: middle;
}

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

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(10, 4, 8, 0.4); /* 更深的底色 */
    border: 1px solid rgba(253, 245, 232, .05) !important;
    backdrop-filter: blur(4px);
}

.history-item.ssr-item {
    border-color: rgba(255, 154, 158, .2) !important;
    background: rgba(255, 154, 158, .08); /* 稍微提亮一点对应颜色的深底 */
}

.history-item.sr-item {
    border-color: rgba(161, 140, 209, .2) !important;
    background: rgba(161, 140, 209, .08);
}

.history-item.r-item {
    border-color: rgba(212, 184, 192, .2) !important;
    background: rgba(212, 184, 192, .08);
}

.ssr-item .history-rarity {
    color: #fecfef;
}

.sr-item .history-rarity {
    color: #c9a0dc;
}

.r-item .history-rarity {
    color: #d4b8c0;
}

.gift-pool-history-empty {
    font-size: 12px;
    color: rgba(255, 237, 219, 0.56);
    padding: 6px 2px 2px;
}

.gift-pool-owned-card {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255, 232, 201, 0.09);
    border-radius: 18px;
    padding: 12px;
    background:
        linear-gradient(180deg, rgba(20, 6, 11, 0.85), rgba(10, 4, 8, 0.95));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.16);
}

.gift-pool-owned-card:active {
    transform: scale(0.99);
}

.gift-pool-owned-badge {
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.4px;
    background: rgba(255, 226, 178, 0.14);
    color: #ffd79f;
}

.gift-pool-owned-title {
    font-size: 14px;
    font-weight: 900;
    color: #fff6ea;
    line-height: 1.45;
}

.gift-pool-owned-desc {
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 244, 232, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gift-pool-owned-note,
.gift-pool-owned-time {
    font-size: 11px;
    color: rgba(255, 231, 206, 0.66);
}

.gift-detail-mask {
    background: rgba(0,0,0,0.62);
}

.gift-detail-card {
    background: linear-gradient(180deg, rgba(62, 17, 31, 0.98), rgba(23, 7, 12, 0.98));
    border: 1px solid rgba(255, 230, 199, 0.12);
    color: #fff;
    box-shadow: 0 24px 60px rgba(0,0,0,0.34);
}

.gift-detail-close {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.gift-detail-icon {
    font-size: 40px;
    width: 84px;
    height: 84px;
    border-radius: 28px;
    margin: 6px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 220, 160, 0.18), rgba(255, 255, 255, 0.06));
    color: #ffd08a;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.gift-detail-name {
    color: #fff6e8;
}

.gift-detail-desc {
    color: rgba(255, 244, 232, 0.9);
}

.gift-pool-modal-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.48);
    z-index: 24600;
    animation: workFadeIn 150ms ease-out forwards;
}

.gift-pool-modal-card {
    width: min(340px, calc(100% - 44px));
    border-radius: 22px;
    padding: 18px 18px 16px;
    background: linear-gradient(180deg, rgba(61, 16, 29, 0.98), rgba(22, 7, 11, 0.98));
    border: 1px solid rgba(255, 230, 198, 0.12);
    box-shadow: 0 24px 60px rgba(0,0,0,0.30);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.gift-pool-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.gift-pool-modal-icon {
    width: 68px;
    height: 68px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd48f;
    background: linear-gradient(180deg, rgba(255, 223, 176, 0.18), rgba(255, 255, 255, 0.05));
    font-size: 28px;
    margin-top: 4px;
}

.gift-pool-modal-title {
    font-size: 18px;
    font-weight: 900;
    color: #fff4e8;
    text-align: center;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
}

.gift-pool-modal-desc {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 241, 228, 0.86);
    text-align: center;
    word-break: break-word;
    white-space: pre-wrap;
}

.gift-pool-modal-ok {
    min-width: 120px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffe4af, #ffbe73);
    color: #35110f;
    box-shadow: 0 10px 24px rgba(255, 190, 115, 0.24);
}

@media (max-width: 430px) {
    .gift-pool-hero {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .gift-pool-ticket-card {
        width: 100%;
    }

    .gift-pool-ask-btn,
    .gift-pool-generate-btn,
    .gift-pool-draw-btn {
        width: 100%;
    }

    .gift-pool-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .gift-pool-hero-title {
        font-size: 18px;
    }
}

/* 抽卡结果动画弹窗 (Result Overlay) */
.gacha-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 4, 8, 0.95);
    z-index: 25000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 60px 20px;
    overflow-y: auto;
    transition: opacity 0.4s;
    opacity: 0;
    pointer-events: none;
}

.gacha-overlay.show {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.gacha-result-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 500px;
    margin-top: auto;
    margin-bottom: 24px;
}

.gacha-close-btn {
    background: rgba(253, 245, 232, 0.08);
    border: 1px solid rgba(253, 245, 232, 0.15);
    color: rgba(253, 245, 232, 0.6);
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 14px;
    font-family: 'Noto Serif SC', serif;
    cursor: pointer;
    letter-spacing: 2px;
    margin-bottom: auto;
    flex-shrink: 0;
    transition: all 0.2s;
}

.gacha-close-btn:active {
    transform: scale(0.95);
    background: rgba(253, 245, 232, 0.15);
}

.gacha-card {
    width: 120px;
    height: 170px;
    border-radius: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    text-align: center;
    transform: rotateY(180deg) scale(0.8);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.gacha-card.revealed {
    transform: rotateY(0deg) scale(1);
}

.gacha-card.single-card {
    width: 180px;
    height: 250px;
    padding: 20px 14px;
}

.gacha-card.ssr-card {
    background: linear-gradient(145deg, #1a0a10, #2d1020);
    border: 1px solid rgba(255, 180, 200, 0.5);
    box-shadow: 0 0 30px rgba(255, 154, 158, 0.3);
}

.gacha-card.sr-card {
    background: linear-gradient(145deg, #120a1a, #1e1030);
    border: 1px solid rgba(161, 140, 209, 0.4);
}

.gacha-card.r-card {
    background: linear-gradient(145deg, #1a1015, #241520);
    border: 1px solid rgba(212, 184, 192, 0.25);
}

.gacha-card-rarity {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 9px;
    font-family: 'Cinzel', serif;
    padding: 2px 6px;
    border-radius: 4px;
}

.ssr-card .gacha-card-rarity {
    color: #fecfef;
    background: rgba(255, 154, 158, 0.2);
    border: 1px solid rgba(255, 154, 158, 0.3);
}

.sr-card .gacha-card-rarity {
    color: #c9a0dc;
    background: rgba(161, 140, 209, 0.2);
    border: 1px solid rgba(161, 140, 209, 0.3);
}

.r-card .gacha-card-rarity {
    color: #d4b8c0;
    background: rgba(212, 184, 192, 0.1);
    border: 1px solid rgba(212, 184, 192, 0.2);
}

.gacha-card-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.single-card .gacha-card-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.gacha-card-name {
    font-size: 12px;
    color: #fdf5e8;
    line-height: 1.4;
    font-weight: 600;
}

.single-card .gacha-card-name {
    font-size: 16px;
}

.gacha-card-desc {
    font-size: 10px;
    color: rgba(253, 245, 232, 0.45);
    margin-top: 6px;
    line-height: 1.5;
}

.single-card .gacha-card-desc {
    font-size: 12px;
    margin-top: 8px;
}

.gacha-ssr-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, rgba(255, 154, 158, 0.15) 0%, transparent 70%);
    animation: gacha-pg 2s ease-in-out infinite;
}

@keyframes gacha-pg {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
