/* Gacha Pro — compact editorial UI (front-end pages only) */

.gacha-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 18px 16px 56px;
    color: var(--ink, #1f2328);
    font-size: 13px;
    line-height: 1.6;
}

.gacha-shell *,
.gacha-shell *::before,
.gacha-shell *::after { box-sizing: border-box; }

.gacha-shell .gacha-crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    color: var(--muted, #6b7280);
    font-size: 12px;
}
.gacha-shell .gacha-crumb a { color: inherit; text-decoration: none; }
.gacha-shell .gacha-crumb a:hover { color: var(--ink, #111827); }
.gacha-shell .gacha-crumb span { color: #c0c4cc; }

.gacha-shell .gacha-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 8px;
    background: var(--surface, #fff);
}
.gacha-shell .gacha-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin-top: 2px;
    color: var(--ink, #111827);
    font-size: 22px;
    line-height: 1;
}
.gacha-shell .gacha-head-icon i { font-size: 22px; }
.gacha-shell .gacha-head-copy { min-width: 0; }
.gacha-shell .gacha-head-copy h1 {
    margin: 0 0 3px;
    color: var(--ink, #111827);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.35;
}
.gacha-shell .gacha-head-copy p {
    margin: 0;
    color: var(--muted, #6b7280);
    font-size: 12.5px;
    line-height: 1.6;
}
.gacha-shell .gacha-head-stat {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 7px 11px;
    border-radius: 4px;
    background: var(--surface-2, #f6f7f9);
    color: var(--muted, #6b7280);
    font-size: 12px;
    white-space: nowrap;
}
.gacha-shell .gacha-head-stat.has-icon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid #1f2937;
    background: #1f2937;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}
.gacha-shell .gacha-head-stat.has-icon i {
    color: #fbbf24;
    font-size: 15px;
}
html[data-theme="dark"] .gacha-shell .gacha-head-stat.has-icon {
    border-color: #fbbf24;
    background: #fbbf24;
    color: #111827;
}
html[data-theme="dark"] .gacha-shell .gacha-head-stat.has-icon i { color: #111827; }

.gacha-shell .gacha-tabs {
    display: flex;
    gap: 3px;
    margin: 12px 0 18px;
    padding: 4px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 8px;
    background: var(--surface, #fff);
    overflow-x: auto;
    scrollbar-width: none;
}
.gacha-shell .gacha-tabs::-webkit-scrollbar { display: none; }
.gacha-shell .gacha-tab {
    flex: 1 0 auto;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 4px;
    color: var(--ink, #374151);
    font-size: 13px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}
.gacha-shell .gacha-tab:hover { color: var(--ink, #111827); background: #fafafa; }
.gacha-shell .gacha-tab.is-active {
    background: #f1f3f5;
    color: var(--ink, #111827);
    font-weight: 700;
}

.gacha-shell .gacha-main { min-width: 0; }

.gacha-shell .gacha-panel2 {
    margin: 0 0 14px;
    padding: 16px 18px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 8px;
    background: var(--surface, #fff);
}
.gacha-shell .gacha-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}
.gacha-shell .gacha-panel-head h2 {
    margin: 0 0 3px;
    color: var(--ink, #111827);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}
.gacha-shell .gacha-panel-head p {
    margin: 0;
    color: var(--muted, #6b7280);
    font-size: 12px;
    line-height: 1.65;
}
.gacha-shell .gacha-sec-title {
    margin: 20px 0 10px;
    color: var(--ink, #111827);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.gacha-shell .gacha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 34px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.gacha-shell .gacha-btn-dark {
    border-color: #1f2937;
    background: #1f2937;
    color: #fff;
}
.gacha-shell .gacha-btn-dark:hover { background: #111827; border-color: #111827; color: #fff; }
.gacha-shell .gacha-btn-light {
    border-color: #d1d5db;
    background: #fff;
    color: #374151;
}
.gacha-shell .gacha-btn-light:hover { border-color: #9ca3af; background: #f9fafb; color: #111827; }
.gacha-shell .gacha-btn.is-disabled,
.gacha-shell .gacha-btn[disabled] {
    opacity: .55;
    cursor: default;
    pointer-events: none;
}
.gacha-shell .gacha-btn-dark.is-disabled {
    opacity: 1;
    background: #374151;
    border-color: #374151;
    color: #fff;
    font-weight: 600;
}
.gacha-shell .gacha-inline-btn { width: auto; min-width: 96px; margin-top: 10px; }
.gacha-shell .gacha-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted, #6b7280);
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    padding: 2px 0;
}
.gacha-shell .gacha-link:hover { color: var(--ink, #111827); text-decoration: underline; }
.gacha-shell .gacha-link.is-danger { color: #dc2626; }

.gacha-shell .form-control,
.gacha-shell .form-select {
    border-color: #d1d5db;
    border-radius: 4px;
    color: var(--ink, #111827);
    font-size: 12px;
    box-shadow: none;
}
.gacha-shell .form-control:focus,
.gacha-shell .form-select:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 2px rgba(17, 24, 39, .06);
}

/* header ticker */
.gacha-shell .gacha-ticker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 9px 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 6px;
    background: var(--surface, #fff);
    overflow: hidden;
}
.gacha-shell .gacha-ticker-label {
    flex: 0 0 auto;
    padding-right: 10px;
    border-right: 1px solid var(--line, #e5e7eb);
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
}
.gacha-shell .gacha-ticker-track {
    display: flex;
    gap: 26px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.gacha-shell .gacha-ticker-item { color: #4b5563; font-size: 12px; }
.gacha-shell .gacha-ticker-item b { color: #111827; font-weight: 600; }
.gacha-shell .gacha-ticker-name { color: var(--ticker-color, #374151); font-weight: 700; }
.gacha-shell .gacha-ticker-item em { color: #9ca3af; font-style: normal; }
.gacha-shell .gacha-ticker-empty { color: #9ca3af; font-size: 12px; }

/* draw */
.gacha-shell .gacha-draw-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 22px 0 8px;
    flex-wrap: wrap;
}
.gacha-shell .gacha-draw-form { display: inline-flex; margin: 0; }
.gacha-shell .gacha-draw-action {
    min-width: 190px;
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: filter .15s ease;
}
.gacha-shell .gacha-draw-action:hover { filter: brightness(.93); }
.gacha-shell .gacha-draw-action.is-free { background: #1f2937; }
.gacha-shell .gacha-draw-action.is-ten { background: #d9482b; }
.gacha-shell .gacha-draw-action.is-hundred { background: #2563eb; }
.gacha-shell .gacha-draw-action[disabled] { opacity: .5; cursor: default; }

.gacha-shell .gacha-balance-line {
    margin: 10px 0 22px;
    color: var(--muted, #6b7280);
    font-size: 12px;
    text-align: center;
}
.gacha-shell .gacha-balance-line b { color: var(--ink, #111827); font-weight: 700; }
.gacha-shell .gacha-balance-line span { margin: 0 12px; color: #d1d5db; }

.gacha-shell .gacha-last {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 6px;
    background: var(--surface, #fff);
}
.gacha-shell .gacha-last-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--muted, #6b7280);
}
.gacha-shell .gacha-last-head strong { color: var(--ink, #111827); font-size: 13px; }
.gacha-shell .gacha-last-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.gacha-shell .gacha-last-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid var(--gacha-border, #d1d5db);
    border-radius: 3px;
    background: var(--gacha-bg, #f9fafb);
    color: var(--gacha-color, #374151);
    font-size: 11px;
}
.gacha-shell .gacha-last-chip em { color: #6b7280; font-style: normal; }
.gacha-shell .gacha-last-chip.is-empty { border-color: #e5e7eb; background: #f9fafb; color: #9ca3af; }

/* rarity pool */
.gacha-shell .gacha-pool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.gacha-shell .gacha-pool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 106px;
    padding: 12px;
    border: 1px solid var(--pool-border, #e5e7eb);
    border-radius: 5px;
    background: var(--pool-bg, #f9fafb);
    text-align: center;
}
.gacha-shell .gacha-pool-rarity {
    color: var(--pool-color, #374151);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
}
.gacha-shell .gacha-pool-count { margin-top: 3px; color: #4b5563; font-size: 11.5px; }
.gacha-shell .gacha-pool-rate { margin-top: 3px; color: var(--pool-color, #374151); font-size: 16px; font-weight: 700; line-height: 1.3; }
.gacha-shell .gacha-pool-card.is-empty { --pool-color: #9ca3af; --pool-bg: #fafafa; --pool-border: #e5e7eb; }

/* unified chips */
.gacha-shell .gacha-title-cloud {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px 12px;
}
.gacha-shell .gacha-title-cloud .gacha-badge--chip,
.gacha-shell .gacha-coll-card > .gacha-badge--chip,
.gacha-shell .gacha-mat-card > .gacha-badge--chip,
.gacha-shell .gacha-recycle-card > .gacha-badge--chip,
.gacha-shell .gacha-recipe-card .gacha-badge--chip,
.gacha-shell .gacha-listing-card > .gacha-badge--chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: auto;
    min-height: 32px;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--gacha-border, #d1d5db);
    border-radius: 5px;
    background: #fff;
    color: var(--gacha-color, #374151);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    overflow: hidden;
}

/* title cloud: roomier cards, full names, clearer rarity */
.gacha-shell .gacha-title-cloud .gacha-badge--chip {
    height: auto;
    min-height: 38px;
    padding: 5px 12px;
    gap: 8px;
    border-radius: 7px;
    font-size: 13px;
}
.gacha-shell .gacha-title-cloud .gacha-badge--chip .gacha-badge-name {
    flex: 1 1 auto;
    text-align: center;
    padding: 0 2px;
    letter-spacing: .01em;
    white-space: normal;
    word-break: break-word;
}
.gacha-shell .gacha-title-cloud .gacha-badge--chip .gacha-badge-rarity {
    padding: 1px 5px;
    font-size: 10.5px;
}

.gacha-shell .gacha-badge--chip .gacha-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    color: var(--gacha-color, #374151);
    font-size: 14px;
}
.gacha-shell .gacha-badge--chip .gacha-badge-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
}
.gacha-shell .gacha-badge--chip .gacha-badge-rarity {
    flex: 0 0 auto;
    padding: 1px 4px;
    border: 0;
    border-radius: 2px;
    background: var(--gacha-bg, #f3f4f6);
    color: var(--gacha-color, #374151);
    font-size: 9.5px;
    line-height: 1.4;
}

/* collection */
.gacha-shell .gacha-coll-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 2px 0 12px;
}
.gacha-shell .gacha-coll-head h2 { margin: 0 0 2px; color: var(--ink, #111827); font-size: 17px; font-weight: 700; }
.gacha-shell .gacha-coll-head p { margin: 0; color: var(--muted, #6b7280); font-size: 12px; }
.gacha-shell .gacha-coll-head > span { color: var(--muted, #6b7280); font-size: 12px; }

.gacha-shell .gacha-coll-grid,
.gacha-shell .gacha-recycle-grid,
.gacha-shell .gacha-mat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.gacha-shell .gacha-coll-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 184px;
    padding: 14px 12px 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 8px;
    background: var(--surface, #fff);
    text-align: center;
}
.gacha-shell .gacha-coll-card.is-equipped { border-color: #111827; background: #f8f9fa; }
.gacha-shell .gacha-coll-card > .gacha-badge--chip { width: auto; min-width: 176px; max-width: 92%; }
.gacha-shell .gacha-coll-desc {
    min-height: 18px;
    margin: 0;
    color: var(--muted, #6b7280);
    font-size: 12px;
    line-height: 1.5;
}
.gacha-shell .gacha-coll-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 11.5px;
}
.gacha-shell .gacha-coll-meta span + span::before { content: "·"; margin-right: 6px; color: #d1d5db; }
.gacha-shell .gacha-coll-actions {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-top: auto;
}
.gacha-shell .gacha-coll-actions > form,
.gacha-shell .gacha-coll-actions > .gacha-gift,
.gacha-shell .gacha-coll-actions > span,
.gacha-shell .gacha-coll-actions > a,
.gacha-shell .gacha-coll-actions > button { flex: 1 1 0; min-width: 0; }
.gacha-shell .gacha-coll-actions .gacha-btn { width: 100%; height: 34px; }

.gacha-shell .gacha-gift { position: relative; }
.gacha-shell .gacha-gift > summary { list-style: none; }
.gacha-shell .gacha-gift > summary::-webkit-details-marker { display: none; }
.gacha-shell .gacha-gift[open] > summary { border-color: #9ca3af; background: #f9fafb; }
.gacha-shell .gacha-pop {
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: calc(100% + 6px);
    width: 240px;
    padding: 10px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 6px;
    background: var(--surface, #fff);
    box-shadow: 0 8px 24px rgba(17, 24, 39, .12);
    text-align: left;
}
.gacha-shell .gacha-pop input { margin-bottom: 6px; }
.gacha-shell .gacha-pop-row { display: flex; gap: 6px; align-items: center; }
.gacha-shell .gacha-pop-row input { width: 64px; margin: 0; }
.gacha-shell .gacha-pop-row .gacha-btn { height: 30px; }

.gacha-shell .gacha-item-more { width: 100%; margin-top: 2px; text-align: center; }
.gacha-shell .gacha-item-more > summary {
    color: #9ca3af;
    font-size: 11px;
    cursor: pointer;
    list-style: none;
}
.gacha-shell .gacha-item-more > summary::-webkit-details-marker { display: none; }
.gacha-shell .gacha-item-more[open] > summary { margin-bottom: 8px; }
.gacha-shell .gacha-more-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--line, #e5e7eb);
}
.gacha-shell .gacha-display-form,
.gacha-shell .gacha-recycle-form { display: inline-flex; align-items: center; gap: 5px; }
.gacha-shell .gacha-display-form .form-select { width: 108px; height: 30px; }
.gacha-shell .gacha-recycle-form .form-control { width: 58px; height: 30px; }

/* smelt */
.gacha-shell .gacha-formula-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.gacha-shell .gacha-formula {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 10px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 6px;
    background: var(--surface-2, #fafafa);
    text-align: center;
}
.gacha-shell .gacha-formula-title { color: #374151; font-size: 13px; font-weight: 700; }
.gacha-shell .gacha-formula-meta { color: #9ca3af; font-size: 11px; line-height: 1.8; }
.gacha-shell .gacha-formula-act { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.gacha-shell .gacha-formula-act .form-control { width: 58px; height: 30px; }
.gacha-shell .gacha-formula-act .gacha-btn { width: auto; height: 30px; padding: 0 12px; }
.gacha-shell .gacha-formula[disabled] { opacity: .6; }

.gacha-shell .gacha-mat-grid { margin-top: 10px; }
.gacha-shell .gacha-mat-card,
.gacha-shell .gacha-recycle-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 8px;
    background: var(--surface, #fff);
    text-align: center;
}
.gacha-shell .gacha-mat-meta { color: #9ca3af; font-size: 11.5px; }
.gacha-shell .gacha-mat-card.is-disabled { opacity: .62; background: #f8fafc; }
.gacha-shell .gacha-mat-card.is-disabled .gacha-badge--chip { filter: grayscale(.35); }
html[data-theme="dark"] .gacha-shell .gacha-mat-card.is-disabled { background: #171b21; }
.gacha-shell .gacha-recycle-card .gacha-recycle-form { width: 100%; justify-content: center; }

/* UR */
.gacha-shell .gacha-recipe-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.gacha-shell .gacha-recipe-card {
    padding: 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 6px;
    background: var(--surface, #fff);
}
.gacha-shell .gacha-recipe-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.gacha-shell .gacha-recipe-head .gacha-badge--chip { width: auto; max-width: 65%; justify-content: flex-start; }
.gacha-shell .gacha-recipe-name { color: var(--ink, #111827); font-size: 13px; font-weight: 700; text-align: right; }
.gacha-shell .gacha-req-pills { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 12px; }
.gacha-shell .gacha-req-pill {
    padding: 3px 6px;
    border-radius: 3px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 10.5px;
    line-height: 1.4;
    white-space: nowrap;
}
.gacha-shell .gacha-req-pill.is-ok { background: #ecfdf5; color: #047857; }
.gacha-shell .gacha-req-pill.is-missing { background: #fef2f2; color: #b91c1c; }
.gacha-shell .gacha-recipe-btn {
    width: 100%;
    height: 38px;
    border: 0;
    border-radius: 4px;
    background: #9ca3af;
    color: #fff;
    font-size: 12.5px;
    cursor: pointer;
}
.gacha-shell .gacha-recipe-btn.is-ready { background: #1f2937; }
.gacha-shell .gacha-recipe-btn[disabled] { cursor: default; }

/* trade */
.gacha-shell .gacha-subtabs {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 0 0 14px;
    padding: 0 2px;
    border-bottom: 1px solid var(--line, #e5e7eb);
}
.gacha-shell .gacha-subtab {
    position: relative;
    padding: 8px 2px 10px;
    color: var(--muted, #6b7280);
    font-size: 12.5px;
    text-decoration: none;
}
.gacha-shell .gacha-subtab.is-active { color: var(--ink, #111827); font-weight: 600; }
.gacha-shell .gacha-subtab.is-active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: #111827;
}
.gacha-shell .gacha-alert {
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 6px;
    background: var(--surface, #fff);
    color: #374151;
    font-size: 12px;
    line-height: 1.7;
}
.gacha-shell .gacha-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    flex-wrap: wrap;
}
.gacha-shell .gacha-filter .form-control { width: 220px; height: 34px; }
.gacha-shell .gacha-filter .form-select { width: 126px; height: 34px; }
.gacha-shell .gacha-filter-btn { width: auto; height: 34px; padding: 0 16px; }
.gacha-shell .gacha-listing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.gacha-shell .gacha-listing-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 8px;
    background: var(--surface, #fff);
    text-align: center;
}
.gacha-shell .gacha-listing-card > .gacha-badge--chip { width: auto; min-width: 176px; max-width: 94%; }
.gacha-shell .gacha-listing-price { display: flex; align-items: baseline; gap: 4px; color: #374151; font-size: 12px; }
.gacha-shell .gacha-listing-price strong { color: #111827; font-size: 16px; font-weight: 700; }
.gacha-shell .gacha-listing-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; color: #6b7280; font-size: 11px; }
.gacha-shell .gacha-listing-seller { color: #9ca3af; font-size: 11px; }
.gacha-shell .gacha-listing-card form { width: 100%; margin-top: 2px; }

.gacha-shell .gacha-order-list { display: grid; gap: 8px; }
.gacha-shell .gacha-order {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 5px;
    background: var(--surface, #fff);
}
.gacha-shell .gacha-order-title { color: #111827; font-size: 12.5px; font-weight: 600; }
.gacha-shell .gacha-order-meta { color: #6b7280; font-size: 11.5px; }
.gacha-shell .gacha-order strong { margin-left: auto; color: #111827; font-size: 13px; }

.gacha-shell .gacha-publish-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 100px 120px auto;
    gap: 10px;
    align-items: end;
}
.gacha-shell .gacha-field { display: flex; flex-direction: column; gap: 4px; }
.gacha-shell .gacha-field label { color: #6b7280; font-size: 11.5px; }
.gacha-shell .gacha-publish-form .gacha-btn { width: auto; height: 34px; padding: 0 16px; }

.gacha-shell .gacha-price-chip,
.gacha-shell .gacha-head-stat {
    padding: 6px 10px;
    border-radius: 4px;
    background: var(--surface-2, #f6f7f9);
    color: var(--muted, #6b7280);
    font-size: 11.5px;
    white-space: nowrap;
}

/* empty state */
.gacha-shell .gacha-empty2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 150px;
    padding: 24px 12px;
    color: #9ca3af;
    text-align: center;
}
.gacha-shell .gacha-empty2-icon { font-size: 24px; color: #c0c4cc; }
.gacha-shell .gacha-empty2 strong { color: #6b7280; font-size: 13px; font-weight: 600; }
.gacha-shell .gacha-empty2 p { margin: 0; color: #9ca3af; font-size: 12px; }

/* dark theme */
html[data-theme="dark"] .gacha-shell .gacha-head,
html[data-theme="dark"] .gacha-shell .gacha-tabs,
html[data-theme="dark"] .gacha-shell .gacha-panel2,
html[data-theme="dark"] .gacha-shell .gacha-ticker,
html[data-theme="dark"] .gacha-shell .gacha-last,
html[data-theme="dark"] .gacha-shell .gacha-coll-card,
html[data-theme="dark"] .gacha-shell .gacha-mat-card,
html[data-theme="dark"] .gacha-shell .gacha-recycle-card,
html[data-theme="dark"] .gacha-shell .gacha-recipe-card,
html[data-theme="dark"] .gacha-shell .gacha-listing-card,
html[data-theme="dark"] .gacha-shell .gacha-order {
    background: var(--surface, #171a20);
    border-color: var(--line, #2b3038);
}
html[data-theme="dark"] .gacha-shell .gacha-head-copy h1,
html[data-theme="dark"] .gacha-shell .gacha-coll-head h2,
html[data-theme="dark"] .gacha-shell .gacha-sec-title,
html[data-theme="dark"] .gacha-shell .gacha-panel-head h2 { color: #f3f4f6; }
html[data-theme="dark"] .gacha-shell .gacha-tab { color: #d1d5db; }
html[data-theme="dark"] .gacha-shell .gacha-tab.is-active { background: #262b33; color: #fff; }
html[data-theme="dark"] .gacha-shell .gacha-title-cloud .gacha-badge--chip,
html[data-theme="dark"] .gacha-shell .gacha-coll-card > .gacha-badge--chip,
html[data-theme="dark"] .gacha-shell .gacha-mat-card > .gacha-badge--chip,
html[data-theme="dark"] .gacha-shell .gacha-recycle-card > .gacha-badge--chip,
html[data-theme="dark"] .gacha-shell .gacha-recipe-card .gacha-badge--chip,
html[data-theme="dark"] .gacha-shell .gacha-listing-card > .gacha-badge--chip { background: #1b1f26; }
html[data-theme="dark"] .gacha-shell .gacha-coll-card.is-equipped { background: #1e232b; border-color: #6b7280; }
html[data-theme="dark"] .gacha-shell .gacha-badge--chip .gacha-badge-icon {
    color: color-mix(in srgb, var(--gacha-color, #d1d5db) 45%, #fff);
    background: rgba(255, 255, 255, .06);
    border-radius: 3px;
}
html[data-theme="dark"] .gacha-shell .gacha-badge--chip .gacha-badge-rarity {
    border: 0;
    background: color-mix(in srgb, var(--gacha-color, #9ca3af) 20%, #1b1f26);
    color: color-mix(in srgb, var(--gacha-color, #d1d5db) 45%, #fff);
}
html[data-theme="dark"] .gacha-shell .gacha-btn-light { background: #1b1f26; border-color: #3a404a; color: #e5e7eb; }
html[data-theme="dark"] .gacha-shell .gacha-btn-light:hover { background: #262b33; color: #fff; }
html[data-theme="dark"] .gacha-shell .gacha-btn-dark { background: #e5e7eb; border-color: #e5e7eb; color: #111827; }
html[data-theme="dark"] .gacha-shell .gacha-btn-dark:hover { background: #fff; border-color: #fff; color: #111827; }
html[data-theme="dark"] .gacha-shell .gacha-alert { background: #171a20; border-color: #2b3038; color: #cbd5e1; }
html[data-theme="dark"] .gacha-shell .gacha-listing-price,
html[data-theme="dark"] .gacha-shell .gacha-listing-price strong { color: #f3f4f6; }
html[data-theme="dark"] .gacha-shell .gacha-listing-seller { color: #9ca3af; }
html[data-theme="dark"] .gacha-shell .gacha-filter .form-control,
html[data-theme="dark"] .gacha-shell .gacha-filter .form-select,
html[data-theme="dark"] .gacha-shell .gacha-publish-form .form-control,
html[data-theme="dark"] .gacha-shell .gacha-publish-form .form-select {
    background: #1b1f26;
    border-color: #3a404a;
    color: #e5e7eb;
}
html[data-theme="dark"] .gacha-shell .gacha-req-pill { background: #262b33; color: #cbd5e1; }
html[data-theme="dark"] .gacha-shell .gacha-req-pill.is-ok { background: #052e23; color: #6ee7b7; }
html[data-theme="dark"] .gacha-shell .gacha-req-pill.is-missing { background: #3f1515; color: #fca5a5; }
html[data-theme="dark"] .gacha-shell .gacha-recipe-name { color: #f3f4f6; }
html[data-theme="dark"] .gacha-shell .gacha-order-title,
html[data-theme="dark"] .gacha-shell .gacha-order strong { color: #f3f4f6; }

@media (max-width: 860px) {
    .gacha-shell .gacha-pool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gacha-shell .gacha-coll-grid,
    .gacha-shell .gacha-mat-grid,
    .gacha-shell .gacha-recycle-grid,
    .gacha-shell .gacha-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gacha-shell .gacha-title-cloud { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .gacha-shell .gacha-publish-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .gacha-shell { padding: 14px 10px 96px; }
    .gacha-shell .gacha-head { flex-wrap: wrap; padding: 16px 14px; }
    .gacha-shell .gacha-head-stat { margin-left: 42px; }
    .gacha-shell .gacha-tabs { gap: 3px; padding: 4px; flex-wrap: wrap; overflow: visible; }
    .gacha-shell .gacha-tab { flex: 1 0 30%; padding: 9px 8px; font-size: 12.5px; }
    .gacha-shell .gacha-draw-actions { flex-direction: column; gap: 8px; }
    .gacha-shell .gacha-draw-form { width: 100%; }
    .gacha-shell .gacha-draw-action { width: 100%; }
    .gacha-shell .gacha-pool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gacha-shell .gacha-title-cloud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gacha-shell .gacha-title-cloud .gacha-badge--chip { height: auto; min-height: 34px; padding: 4px 8px; gap: 4px; font-size: 12px; }
    .gacha-shell .gacha-title-cloud .gacha-badge--chip .gacha-badge-icon { width: 16px; height: 16px; font-size: 14px; }
    .gacha-shell .gacha-title-cloud .gacha-badge--chip .gacha-badge-rarity { padding: 1px 4px; font-size: 9.5px; }
    .gacha-shell .gacha-coll-grid,
    .gacha-shell .gacha-mat-grid,
    .gacha-shell .gacha-recycle-grid,
    .gacha-shell .gacha-listing-grid,
    .gacha-shell .gacha-recipe-grid { grid-template-columns: 1fr; }
    .gacha-shell .gacha-formula-grid { grid-template-columns: 1fr; }
    .gacha-shell .gacha-coll-actions { flex-wrap: nowrap; }
    .gacha-shell .gacha-coll-card > .gacha-badge--chip,
    .gacha-shell .gacha-listing-card > .gacha-badge--chip { min-width: 190px; }
    .gacha-shell .gacha-filter .form-control,
    .gacha-shell .gacha-filter .form-select { width: 100%; }
    .gacha-shell .gacha-publish-form { grid-template-columns: 1fr; }
    .gacha-shell .gacha-publish-form .gacha-btn { width: 100%; }
    .gacha-shell .gacha-order { flex-wrap: wrap; }
    .gacha-shell .gacha-order strong { width: 100%; margin-left: 0; }
}

/* ---------- Xiuno AI square language: match the main site's hard edges ---------- */
.gacha-shell,
.gacha-shell * {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.gacha-shell :focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---------- Micro-interactions: quiet, editorial, no layout shift ---------- */
.gacha-shell {
    --gacha-ease: cubic-bezier(.2, .8, .2, 1);
}

@keyframes gacha-fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes gacha-flash-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes gacha-pop-in {
    from { opacity: 0; transform: translateY(4px) scale(.99); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes gacha-spin {
    to { transform: rotate(360deg); }
}

.gacha-shell .gacha-reveal {
    opacity: 0;
    transform: translateY(6px);
    transition:
        opacity .32s var(--gacha-ease),
        transform .32s var(--gacha-ease);
    transition-delay: calc(var(--gacha-i, 0) * 24ms);
}
.gacha-shell .gacha-reveal.is-in {
    opacity: 1;
    transform: none;
}

.gacha-shell .gacha-head-icon {
    transition: transform .22s var(--gacha-ease), background-color .18s ease;
}
.gacha-shell .gacha-head:hover .gacha-head-icon {
    transform: translateY(-1px) rotate(-4deg);
}

.gacha-shell .gacha-tab {
    transition: background-color .15s ease, color .15s ease, transform .15s var(--gacha-ease);
}
.gacha-shell .gacha-tab:hover { transform: translateY(-1px); }
.gacha-shell .gacha-tab.is-active { transform: none; }

.gacha-shell .gacha-draw-action {
    transition: filter .15s ease, transform .15s var(--gacha-ease);
}
.gacha-shell .gacha-draw-action:hover { transform: translateY(-1px); filter: brightness(1.04); }
.gacha-shell .gacha-draw-action:active { transform: translateY(0) scale(.995); }
.gacha-shell .gacha-draw-action[disabled]:hover { transform: none; filter: none; }

.gacha-shell .gacha-pool-card,
.gacha-shell .gacha-coll-card,
.gacha-shell .gacha-recipe-card,
.gacha-shell .gacha-listing-card,
.gacha-shell .gacha-formula {
    transition:
        border-color .16s ease,
        background-color .16s ease,
        transform .18s var(--gacha-ease);
}
.gacha-shell .gacha-pool-card:hover,
.gacha-shell .gacha-coll-card:hover,
.gacha-shell .gacha-recipe-card:hover,
.gacha-shell .gacha-listing-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
}
.gacha-shell .gacha-coll-card.is-equipped:hover { border-color: #111827; }

.gacha-shell .gacha-badge--chip {
    transition: transform .15s var(--gacha-ease), filter .15s ease;
}
.gacha-shell a.gacha-badge--chip:hover,
.gacha-shell .gacha-title-cloud a.gacha-badge--chip:hover {
    transform: translateY(-1px);
    filter: brightness(.99);
}

.gacha-shell details > summary {
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.gacha-shell .gacha-more-body.is-opening,
.gacha-shell .gacha-pop.is-opening {
    animation: gacha-pop-in .18s var(--gacha-ease) both;
}

.gacha-shell button.is-loading {
    position: relative;
    cursor: progress;
    pointer-events: none;
    opacity: .82;
}
.gacha-shell button.is-loading::after {
    content: "";
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-left: 6px;
    border: 1.5px solid currentColor;
    border-right-color: transparent;
    border-radius: 50% !important;
    vertical-align: -1px;
    animation: gacha-spin .7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .gacha-shell .gacha-reveal { opacity: 1; transform: none; transition: none; }
    .gacha-shell .gacha-head:hover .gacha-head-icon,
    .gacha-shell .gacha-tab:hover,
    .gacha-shell .gacha-draw-action:hover,
    .gacha-shell .gacha-pool-card:hover,
    .gacha-shell .gacha-coll-card:hover,
    .gacha-shell .gacha-recipe-card:hover,
    .gacha-shell .gacha-listing-card:hover,
    .gacha-shell a.gacha-badge--chip:hover { transform: none; }
    .gacha-shell button.is-loading::after { animation: none; }
}

/* 3.0.0：记录、通知、批量、议价与分页 */
.gacha-shell .gacha-quicklinks {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 6px;
	margin: -6px 0 12px;
}
.gacha-shell .gacha-quicklinks a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 26px;
	padding: 0 8px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--muted);
	font-size: 11px;
	text-decoration: none;
}
.gacha-shell .gacha-quicklinks a:hover { border-color: #9ca3af; color: var(--ink); }
.gacha-shell .gacha-quicklinks b {
	min-width: 15px;
	height: 15px;
	padding: 0 4px;
	background: #dc2626;
	color: #fff;
	font-size: 9px;
	line-height: 15px;
	text-align: center;
	font-weight: 600;
}
.gacha-shell .gacha-pity-box {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 14px;
}
.gacha-shell .gacha-pity-box > div {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 3px 10px;
	padding: 11px 13px;
	border: 1px solid var(--line);
	background: #fff;
}
.gacha-shell .gacha-pity-box span { color: var(--muted); font-size: 11px; }
.gacha-shell .gacha-pity-box b { color: var(--ink); font-size: 12px; font-weight: 600; }
.gacha-shell .gacha-pity-box em {
	grid-column: 1 / -1;
	display: block;
	height: 4px;
	background: #eef1f4;
	color: transparent;
	font-size: 0;
	overflow: hidden;
}
.gacha-shell .gacha-pity-box em::after {
	content: "";
	display: block;
	width: var(--pity, 0%);
	height: 100%;
	background: #1f2937;
}
.gacha-shell .gacha-history-list { border: 1px solid var(--line); background: #fff; }
.gacha-shell .gacha-history-row { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.gacha-shell .gacha-history-row:last-child { border-bottom: 0; }
.gacha-shell .gacha-history-head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
	color: var(--muted);
	font-size: 11px;
}
.gacha-shell .gacha-history-head strong { color: var(--ink); font-size: 11.5px; font-weight: 600; }
.gacha-shell .gacha-history-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.gacha-shell .gacha-history-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 24px;
	padding: 0 7px;
	border: 1px solid var(--gacha-border, var(--line));
	background: var(--gacha-bg, #fff);
	color: var(--gacha-color, var(--ink));
	font-size: 11px;
}
.gacha-shell .gacha-history-chip em { font-style: normal; opacity: .7; font-size: 10px; }
.gacha-shell .gacha-history-chip small { color: #6b7280; font-size: 9px; }
.gacha-shell .gacha-history-chip.is-empty { border-style: dashed; color: #9ca3af; background: #fafafa; }
.gacha-shell .gacha-notice-list { border: 1px solid var(--line); background: #fff; }
.gacha-shell .gacha-notice {
	display: flex;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
	color: inherit;
	text-decoration: none;
}
.gacha-shell .gacha-notice:last-child { border-bottom: 0; }
.gacha-shell .gacha-notice:hover { background: #fafbfc; }
.gacha-shell .gacha-notice-dot {
	flex: 0 0 6px;
	width: 6px;
	height: 6px;
	margin-top: 6px;
	background: transparent;
}
.gacha-shell .gacha-notice.is-unread .gacha-notice-dot { background: #dc2626; }
.gacha-shell .gacha-notice.is-unread strong { font-weight: 700; }
.gacha-shell .gacha-notice div { min-width: 0; }
.gacha-shell .gacha-notice strong { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.gacha-shell .gacha-notice p { margin: 3px 0; color: var(--muted); font-size: 11.5px; }
.gacha-shell .gacha-notice em { color: #9ca3af; font-size: 10px; font-style: normal; }
.gacha-shell .gacha-batch-form { margin: 0; }
.gacha-shell .gacha-batch-bar {
	position: sticky;
	top: 8px;
	z-index: 5;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
	padding: 8px 10px;
	border: 1px solid var(--line);
	background: rgba(255,255,255,.95);
}
.gacha-shell .gacha-batch-bar label { display: inline-flex; align-items: center; gap: 5px; margin: 0; color: var(--muted); font-size: 11px; }
.gacha-shell .gacha-batch-bar .gacha-btn { height: 28px; padding: 0 9px; font-size: 11px; }
.gacha-shell .gacha-batch-bar .is-danger { color: #b91c1c; border-color: #fecaca; }
.gacha-shell .gacha-check { position: absolute; top: 8px; right: 8px; z-index: 2; display: inline-flex; margin: 0; cursor: pointer; }
.gacha-shell .gacha-check input { width: 14px; height: 14px; margin: 0; accent-color: #1f2937; cursor: pointer; }
.gacha-shell .gacha-check span { display: none; }
.gacha-shell .gacha-collection-card { position: relative; }
.gacha-shell .gacha-collection-card:has(.gacha-check input:checked) { border-color: #1f2937; background: #fafafa; }
.gacha-shell .gacha-offers {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed var(--line);
	font-size: 11px;
	color: var(--muted);
}
.gacha-shell .gacha-offer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
.gacha-shell .gacha-offer strong { color: var(--ink); }
.gacha-shell .gacha-offer-form summary { cursor: pointer; color: #1f2937; }
.gacha-shell .gacha-pop-row { display: flex; gap: 6px; margin-top: 6px; }
.gacha-shell .gacha-pop-row .form-control { height: 30px; font-size: 11px; }
.gacha-shell .gacha-pop-row .gacha-btn { height: 30px; padding: 0 9px; font-size: 11px; }
.gacha-shell .gacha-pager { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
.gacha-shell .gacha-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--muted);
	font-size: 11px;
	text-decoration: none;
}
.gacha-shell .gacha-page-btn:hover { border-color: #9ca3af; color: var(--ink); }
.gacha-shell .gacha-page-btn.is-active { border-color: #1f2937; background: #1f2937; color: #fff; }
.gacha-shell .gacha-page-btn.is-disabled { opacity: .4; pointer-events: none; }
.gacha-shell .gacha-page-gap { color: #9ca3af; font-size: 11px; padding: 0 2px; }
html[data-theme="dark"] .gacha-shell .gacha-quicklinks a,
html[data-theme="dark"] .gacha-shell .gacha-pity-box > div,
html[data-theme="dark"] .gacha-shell .gacha-history-list,
html[data-theme="dark"] .gacha-shell .gacha-notice-list,
html[data-theme="dark"] .gacha-shell .gacha-batch-bar,
html[data-theme="dark"] .gacha-shell .gacha-page-btn { background: var(--surface-2); border-color: var(--line-strong); }
html[data-theme="dark"] .gacha-shell .gacha-pity-box em { background: #374151; }
html[data-theme="dark"] .gacha-shell .gacha-history-row,
html[data-theme="dark"] .gacha-shell .gacha-notice { border-color: var(--line); }
@media (max-width: 640px) {
	.gacha-shell .gacha-pity-box { grid-template-columns: 1fr; }
	.gacha-shell .gacha-quicklinks { justify-content: flex-start; }
	.gacha-shell .gacha-batch-bar { position: static; }
}

/* SP / UR 抽中全屏特效 */
.gacha-special { position:fixed; inset:0; z-index:3000; display:grid; place-items:center; padding:24px; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .35s ease, visibility .35s ease; --special:#dc2626; --special-soft:rgba(220,38,38,.38); --special-glow:rgba(248,113,113,.9); }
.gacha-special--ur { --special:#7c3aed; --special-soft:rgba(124,58,237,.38); --special-glow:rgba(196,181,253,.95); }
.gacha-special--ssr { --special:#b45309; --special-soft:rgba(245,158,11,.30); --special-glow:rgba(253,230,138,.90); }
.gacha-special--sr { --special:#2563eb; --special-soft:rgba(37,99,235,.28); --special-glow:rgba(191,219,254,.90); }
.gacha-special--r { --special:#15803d; --special-soft:rgba(21,128,61,.26); --special-glow:rgba(187,247,208,.90); }
.gacha-special--n { --special:#6b7280; --special-soft:rgba(107,114,128,.24); --special-glow:rgba(229,231,235,.90); }
.gacha-special.is-active { opacity:1; visibility:visible; pointer-events:auto; }
.gacha-special-backdrop { position:absolute; inset:0; background:radial-gradient(circle at 50% 45%, var(--special-soft), transparent 46%), rgba(8,10,15,.82); backdrop-filter:blur(8px); }
.gacha-special-aura { position:absolute; width:min(74vw,660px); aspect-ratio:1; border-radius:50%; background:conic-gradient(from 20deg, transparent, var(--special-soft), transparent 38%, var(--special-soft), transparent 72%); filter:blur(30px); opacity:.9; animation:gacha-special-spin 11s linear infinite; }
.gacha-special-rays { position:absolute; width:min(94vw,820px); aspect-ratio:1; border-radius:50%; background:repeating-conic-gradient(from 0deg, rgba(255,255,255,.22) 0deg 2deg, transparent 2deg 16deg); mask:radial-gradient(circle, transparent 30%, #000 34%, transparent 72%); opacity:.5; animation:gacha-special-spin 22s linear infinite reverse; }
.gacha-special-sparks { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.gacha-special-sparks span { position:absolute; left:50%; top:48%; width:6px; height:6px; margin:-3px; border-radius:50%; background:var(--special-glow); box-shadow:0 0 10px var(--special-glow); opacity:0; animation:gacha-special-spark 2.6s ease-out infinite; animation-delay:calc(var(--i) * -.12s); }
.gacha-special-card { position:relative; z-index:2; width:min(430px,92vw); padding:30px 26px 24px; text-align:center; background:rgba(15,18,25,.94); border:1px solid color-mix(in srgb, var(--special) 45%, transparent); box-shadow:0 30px 90px rgba(0,0,0,.5), 0 0 46px var(--special-soft); transform:translateY(16px) scale(.94); opacity:0; transition:transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease; }
.gacha-special.is-active .gacha-special-card { transform:none; opacity:1; }
.gacha-special-kicker { display:block; font-size:10px; letter-spacing:.24em; font-weight:800; text-transform:uppercase; }
.gacha-special-badge { display:flex; align-items:center; justify-content:center; min-height:52px; margin:26px auto 20px; }
.gacha-special-badge .gacha-badge { width:auto; max-width:100%; flex:0 0 auto; transform:scale(1.55); transform-origin:center; }
.gacha-special-card h2 { margin:0 0 6px; color:#fff; font-size:24px; line-height:1.25; letter-spacing:.02em; }
.gacha-special-card p { margin:0 0 22px; color:rgba(255,255,255,.63); font-size:12px; }
.gacha-special-card .gacha-btn { min-width:140px; }

/* SSR / SR / R / N：简洁版全屏提示，弱化背景与装饰，只保留卡片和一级光晕。 */
.gacha-special.is-simple .gacha-special-backdrop { background:rgba(8,10,15,.66); backdrop-filter:blur(4px); }
.gacha-special.is-simple .gacha-special-aura,
.gacha-special.is-simple .gacha-special-rays,
.gacha-special.is-simple .gacha-special-sparks { display:none; }
.gacha-special.is-simple .gacha-special-card {
  width:min(360px,90vw);
  padding:24px 22px 20px;
  background:rgba(18,21,28,.96);
  border-color:color-mix(in srgb, var(--special) 38%, transparent);
  box-shadow:0 22px 64px rgba(0,0,0,.46), 0 0 30px var(--special-soft);
}
.gacha-special.is-simple .gacha-special-kicker { font-size:9px; letter-spacing:.14em; }
.gacha-special.is-simple .gacha-special-badge { min-height:44px; margin:20px auto 16px; }
.gacha-special.is-simple .gacha-special-badge .gacha-badge { transform:scale(1.25); }
.gacha-special.is-simple .gacha-special-card p { margin-bottom:18px; }
.gacha-special.is-simple .gacha-special-card .gacha-btn { min-width:120px; }
.gacha-special-open { overflow:hidden; }
@keyframes gacha-special-spin { to { transform:rotate(360deg); } }
@keyframes gacha-special-spark { 0% { opacity:0; transform:rotate(var(--a)) translateY(-30px) scale(.3); } 18% { opacity:1; } 100% { opacity:0; transform:rotate(var(--a)) translateY(-190px) scale(1); } }
@media (max-width:640px) {
  .gacha-special { padding:16px; }
  .gacha-special-card { padding:24px 18px 20px; }
  .gacha-special-card h2 { font-size:21px; }
  .gacha-special-badge .gacha-badge { transform:scale(1.35); }
  .gacha-special-aura { width:92vw; }
}
@media (prefers-reduced-motion: reduce) {
  .gacha-special-aura, .gacha-special-rays, .gacha-special-sparks span { animation:none; }
  .gacha-special-sparks { display:none; }
  .gacha-special-card { transition:none; }
}

.gacha-special-card .gacha-btn-dark { background:#1f2937; color:#fff; border:1px solid #1f2937; }
.gacha-special-card .gacha-btn-dark:hover { background:#111827; border-color:#111827; }

/* ===== v3.1.9: readability, wallet header, sticky tabs, ticker, dark ===== */

/* --- readability floor --- */
.gacha-shell { max-width: 1040px; font-size: 14px; }
.gacha-shell .gacha-sec-title { font-size: 16.5px; }
.gacha-shell .gacha-tab { font-size: 13.5px; }
.gacha-shell .gacha-ticker-item { font-size: 12.5px; }
.gacha-shell .gacha-pool-rarity { font-size: 12px; letter-spacing: .06em; }
.gacha-shell .gacha-pool-count { font-size: 12px; }
.gacha-shell .gacha-pool-rate { font-size: 19px; }
.gacha-shell .gacha-quicklinks a { min-height: 34px; font-size: 12.5px; }
.gacha-shell .gacha-page-btn { min-width: 34px; height: 34px; font-size: 12.5px; }
.gacha-shell .gacha-batch-bar label { font-size: 12px; }
.gacha-shell .gacha-batch-bar .gacha-btn { height: 32px; font-size: 12px; }
.gacha-shell .gacha-history-row { font-size: 12.5px; }

/* --- header wallet --- */
.gacha-shell .gacha-head-side {
    flex: 0 0 auto; display: flex; align-items: center; gap: 18px;
    padding-left: 20px; border-left: 1px solid var(--line, #e5e7eb);
}
.gacha-shell .gacha-wallet { min-width: 214px; }
.gacha-shell .gacha-wallet-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    color: inherit; text-decoration: none;
}
.gacha-shell .gacha-wallet-k { color: var(--muted, #6b7280); font-size: 11.5px; letter-spacing: .04em; }
.gacha-shell .gacha-wallet-v {
    font-size: 22px; font-weight: 800; letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.gacha-shell a.gacha-wallet-head:hover .gacha-wallet-v { color: #111827; }
.gacha-shell .gacha-wallet-sub {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-top: 2px; color: var(--muted, #6b7280); font-size: 11.5px;
}
.gacha-shell .gacha-wallet-sub b { color: var(--ink, #111827); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.gacha-shell .gacha-wallet-sub i { color: var(--muted, #6b7280); font-style: normal; font-weight: 500; }
.gacha-shell .gacha-wallet-prog { display: block; height: 4px; margin-top: 6px; background: #e5e7eb; }
.gacha-shell .gacha-wallet-prog i { display: block; height: 100%; background: linear-gradient(90deg, #111827, #4b5563); }
.gacha-shell .gacha-wallet-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-top: 6px; font-size: 11.5px;
}
.gacha-shell .gacha-free { display: inline-flex; align-items: center; gap: 5px; color: var(--muted, #6b7280); }
.gacha-shell .gacha-free::before { content: ""; width: 6px; height: 6px; background: #9ca3af; }
.gacha-shell .gacha-free.is-ready { color: #047857; }
.gacha-shell .gacha-free.is-ready::before { background: #059669; }
.gacha-shell .gacha-wallet-link { color: var(--ink, #111827); text-decoration: none; font-weight: 600; }
.gacha-shell .gacha-wallet-link:hover { text-decoration: underline; }

/* --- sticky tabs + sliding pill --- */
.gacha-shell .gacha-tabs { position: relative; }
.gacha-shell .gacha-tabs-pill {
    position: absolute; top: 4px; left: 0; width: 0; height: calc(100% - 8px);
    background: var(--ink, #111827); opacity: 0; pointer-events: none; z-index: 0;
    transition: transform .28s cubic-bezier(.2,.7,.25,1), width .28s cubic-bezier(.2,.7,.25,1);
}
.gacha-shell .gacha-tabs.is-ready .gacha-tabs-pill { opacity: 1; }
.gacha-shell .gacha-tab { position: relative; z-index: 1; }
.gacha-shell .gacha-tab.is-active { background: var(--ink, #111827); color: var(--surface, #fff); }
.gacha-shell .gacha-tab.is-active:hover { background: var(--ink, #111827); color: var(--surface, #fff); }
/* JS 就绪后由滑动药丸接管背景；脚本未执行时上面的实底保证当前页签可读。 */
.gacha-shell .gacha-tabs.is-ready .gacha-tab.is-active { background: transparent; }
.gacha-shell .gacha-tabs.is-ready .gacha-tab.is-active:hover { background: transparent; }
@media (min-width: 721px) {
    .gacha-shell .gacha-tabs {
        position: sticky; top: calc(var(--header-h, 68px) + 8px); z-index: 40;
        overflow: visible; background: color-mix(in srgb, var(--surface, #fff) 94%, transparent);
        backdrop-filter: saturate(1.1) blur(10px);
    }
}
@media (max-width: 720px) {
    .gacha-shell .gacha-tabs-pill { display: none; }
    .gacha-shell .gacha-tab.is-active { background: var(--ink, #111827); color: var(--surface, #fff); }
    .gacha-shell .gacha-head-side {
        width: 100%; margin-top: 12px; padding: 12px 0 0;
        border-left: 0; border-top: 1px solid var(--line, #e5e7eb);
    }
    .gacha-shell .gacha-wallet { min-width: 0; width: 100%; }
}

/* --- ticker marquee --- */
.gacha-shell .gacha-ticker {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 30px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 30px), transparent 100%);
}
.gacha-shell .gacha-ticker-track { display: flex; align-items: center; gap: 28px; width: max-content; will-change: transform; }
.gacha-shell .gacha-ticker-track .gacha-ticker-item { white-space: nowrap; }
.gacha-shell .gacha-ticker-track.is-running { animation: gacha-marquee var(--gacha-marquee, 32s) linear infinite; }
.gacha-shell .gacha-ticker:hover .gacha-ticker-track.is-running,
.gacha-shell .gacha-ticker:focus-within .gacha-ticker-track.is-running { animation-play-state: paused; }
@keyframes gacha-marquee { from { transform: translateX(0); } to { transform: translateX(var(--gacha-shift, -50%)); } }
@media (prefers-reduced-motion: reduce) { .gacha-shell .gacha-ticker-track.is-running { animation: none; } }

/* --- dark fixes --- */
html[data-theme="dark"] .gacha-shell .gacha-ticker-item b { color: var(--ink, #e5e7eb); }
html[data-theme="dark"] .gacha-shell .gacha-ticker-item em { color: var(--muted, #94a3b8); }
html[data-theme="dark"] .gacha-shell .gacha-head-stat,
html[data-theme="dark"] .gacha-shell .gacha-head-stat.has-icon {
    background: #1b1f26; border-color: #2b3038; color: #e5e7eb;
}
html[data-theme="dark"] .gacha-shell .gacha-head-stat.has-icon i { color: #e5e7eb; }
html[data-theme="dark"] .gacha-shell .gacha-pool-card {
    background: color-mix(in srgb, var(--pool-color, #9ca3af) 12%, #12161c);
    border-color: color-mix(in srgb, var(--pool-color, #9ca3af) 30%, #2b3038);
}
html[data-theme="dark"] .gacha-shell .gacha-pool-card.is-empty { background: #141922; border-color: #2b3038; }
html[data-theme="dark"] .gacha-shell .gacha-pool-count { color: var(--muted, #94a3b8); }
html[data-theme="dark"] .gacha-shell .gacha-wallet-prog { background: #2b3038; }
html[data-theme="dark"] .gacha-shell .gacha-wallet-prog i { background: linear-gradient(90deg, #e5e7eb, #9ca3af); }
html[data-theme="dark"] .gacha-shell a.gacha-wallet-head:hover .gacha-wallet-v { color: #fff; }

/* --- flash as toast --- */
.gacha-shell .gacha-flash {
    position: fixed; top: calc(var(--header-h, 68px) + 14px); right: 18px; left: auto;
    z-index: 1045; max-width: 400px; margin: 0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
    animation: gacha-toast-in .26s cubic-bezier(.2,.7,.25,1) both;
}
.gacha-shell .gacha-flash-close {
    margin-left: 10px; padding: 2px 6px; border: 0; background: transparent;
    color: inherit; line-height: 1; cursor: pointer; opacity: .55;
}
.gacha-shell .gacha-flash-close:hover { opacity: 1; }
@keyframes gacha-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
    .gacha-shell .gacha-flash { left: 12px; right: 12px; max-width: none; }
}

/* --- result reveal --- */
.gacha-shell .gacha-last-grid .gacha-last-chip { animation: gacha-rise .42s cubic-bezier(.2,.7,.25,1) both; }
.gacha-shell .gacha-last-grid .gacha-last-chip:nth-child(2) { animation-delay: .04s; }
.gacha-shell .gacha-last-grid .gacha-last-chip:nth-child(3) { animation-delay: .08s; }
.gacha-shell .gacha-last-grid .gacha-last-chip:nth-child(4) { animation-delay: .12s; }
.gacha-shell .gacha-last-grid .gacha-last-chip:nth-child(5) { animation-delay: .16s; }
.gacha-shell .gacha-last-grid .gacha-last-chip:nth-child(6) { animation-delay: .20s; }
.gacha-shell .gacha-last-grid .gacha-last-chip:nth-child(7) { animation-delay: .24s; }
.gacha-shell .gacha-last-grid .gacha-last-chip:nth-child(8) { animation-delay: .28s; }
.gacha-shell .gacha-last-grid .gacha-last-chip:nth-child(9) { animation-delay: .32s; }
.gacha-shell .gacha-last-grid .gacha-last-chip:nth-child(10) { animation-delay: .36s; }
.gacha-shell .gacha-last-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.gacha-shell .gacha-last-actions .gacha-btn { min-height: 34px; font-size: 12.5px; }
@keyframes gacha-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .gacha-shell .gacha-last-grid .gacha-last-chip { animation: none; }
}

/* --- ticker viewport (v3.1.9 fix) --- */
.gacha-shell .gacha-ticker { -webkit-mask-image: none; mask-image: none; }
.gacha-shell .gacha-ticker-trackwrap {
    flex: 1 1 auto; min-width: 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 26px), transparent 100%);
}
.gacha-shell .gacha-ticker-track { width: max-content; }
.gacha-shell .gacha-ticker-track .gacha-ticker-item + .gacha-ticker-item::before {
    content: "·"; margin-right: 14px; color: #d1d5db; font-weight: 400;
}
html[data-theme="dark"] .gacha-shell .gacha-ticker-track .gacha-ticker-item + .gacha-ticker-item::before { color: #4b5563; }

/* --- draw buttons: one primary, two quiet --- */
.gacha-shell .gacha-draw-actions { gap: 12px; margin: 20px 0 10px; }
.gacha-shell .gacha-draw-action {
    display: inline-flex; align-items: center; gap: 12px;
    min-width: 200px; height: 56px; padding: 0 18px;
    border: 1px solid var(--line-strong, #d1d5db); border-radius: 0;
    background: var(--surface, #fff); color: var(--ink, #111827);
    text-align: left; transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.gacha-shell .gacha-draw-action:hover { filter: none; border-color: #111827; transform: translateY(-1px); }
.gacha-shell .gacha-draw-action.is-free,
.gacha-shell .gacha-draw-action.is-hundred { background: var(--surface, #fff); color: var(--ink, #111827); }
.gacha-shell .gacha-draw-num { font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gacha-shell .gacha-draw-copy { display: flex; flex-direction: column; gap: 3px; line-height: 1.15; }
.gacha-shell .gacha-draw-copy b { font-size: 13.5px; font-weight: 700; }
.gacha-shell .gacha-draw-copy em { color: var(--muted, #6b7280); font-size: 11.5px; font-style: normal; }
.gacha-shell .gacha-draw-action.is-ten { background: #111827; border-color: #111827; color: #fff; }
.gacha-shell .gacha-draw-action.is-ten .gacha-draw-copy em { color: #cbd5e1; }
.gacha-shell .gacha-draw-action.is-ten:hover { background: #000; border-color: #000; }
.gacha-shell .gacha-draw-action.is-ready { background: #ecfdf5; border-color: #059669; color: #065f46; }
.gacha-shell .gacha-draw-action.is-ready .gacha-draw-copy em { color: #047857; }
html[data-theme="dark"] .gacha-shell .gacha-draw-action { background: #141922; border-color: #2b3038; color: #e5e7eb; }
html[data-theme="dark"] .gacha-shell .gacha-draw-action.is-free,
html[data-theme="dark"] .gacha-shell .gacha-draw-action.is-hundred { background: #141922; color: #e5e7eb; }
html[data-theme="dark"] .gacha-shell .gacha-draw-action.is-ten { background: #e5e7eb; border-color: #e5e7eb; color: #0b0f14; }
html[data-theme="dark"] .gacha-shell .gacha-draw-action.is-ten .gacha-draw-copy em { color: #475569; }
html[data-theme="dark"] .gacha-shell .gacha-draw-action.is-ready { background: #07231c; border-color: #065f46; color: #6ee7b7; }

/* --- pool cards: rate first, calmer tiles --- */
.gacha-shell .gacha-pool-card { padding: 16px 16px 14px; }
.gacha-shell .gacha-pool-rate { margin-top: 8px; font-size: 26px; line-height: 1.05; }
.gacha-shell .gacha-pool-count { margin-top: 4px; }

/* --- section head + title cloud tools --- */
.gacha-shell .gacha-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.gacha-shell .gacha-sec-head .gacha-sec-title { margin: 0; }
.gacha-shell .gacha-sec-meta { color: var(--muted, #6b7280); font-size: 12.5px; }
.gacha-shell .gacha-cloud-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.gacha-shell .gacha-cloud-search { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; min-width: 200px; border: 1px solid var(--line, #e5e7eb); border-radius: 0; background: var(--surface, #fff); }
.gacha-shell .gacha-cloud-search i { color: var(--muted, #6b7280); font-size: 13px; }
.gacha-shell .gacha-cloud-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink, #111827); font-size: 12.5px; }
.gacha-shell .gacha-cloud-filter { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gacha-shell .gacha-cloud-filter button { height: 30px; padding: 0 10px; border: 1px solid transparent; border-radius: 0; background: transparent; color: var(--muted, #6b7280); font-size: 12px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.gacha-shell .gacha-cloud-filter button b { margin-left: 2px; font-size: 11px; font-weight: 600; opacity: .75; }
.gacha-shell .gacha-cloud-filter button:hover { background: var(--surface-2, #f3f4f6); color: var(--ink, #111827); }
.gacha-shell .gacha-cloud-filter button.is-active { background: #111827; color: #fff; }
.gacha-shell .gacha-cloud-cell { display: flex; min-width: 0; }
.gacha-shell .gacha-cloud-none { margin: 18px 0; color: var(--muted, #6b7280); font-size: 12.5px; }
html[data-theme="dark"] .gacha-shell .gacha-cloud-search { background: #141922; border-color: #2b3038; }
html[data-theme="dark"] .gacha-shell .gacha-cloud-search input { color: #e5e7eb; }
html[data-theme="dark"] .gacha-shell .gacha-cloud-filter button:hover { background: #1a2029; color: #e5e7eb; }
html[data-theme="dark"] .gacha-shell .gacha-cloud-filter button.is-active { background: #e5e7eb; color: #0b0f14; }

/* --- publish form: one clean row + hint --- */
@media (min-width: 641px) {
    .gacha-shell .gacha-publish-form { grid-template-columns: minmax(0, 2fr) 100px 120px auto; align-items: end; }
}
.gacha-shell .gacha-publish-hint { grid-column: 1 / -1; margin: 2px 0 0; color: var(--muted, #6b7280); font-size: 11.5px; }
.gacha-shell .gacha-publish-hint b { color: var(--ink, #111827); font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- batch bar: compact, below sticky header --- */
.gacha-shell .gacha-batch-bar { top: calc(var(--header-h, 68px) + 8px); }
.gacha-shell .gacha-batch-bar .gacha-btn { width: auto; }
html[data-theme="dark"] .gacha-shell .gacha-batch-bar { background: rgba(20, 25, 34, .95); }

/* --- hero stat cells on secondary pages --- */
.gacha-shell .gacha-wallet.is-stat { min-width: 150px; }
.gacha-shell .gacha-wallet.is-stat .gacha-wallet-v { font-size: 20px; }

/* --- dark: let the light pill show through, keep a readable label --- */
@media (min-width: 721px) {
    html[data-theme="dark"] .gacha-shell .gacha-tab.is-active { background: transparent; color: #0b0f14; }
}

/* --- mobile ticker: drop the label, keep a clean fade --- */
@media (max-width: 640px) {
    .gacha-shell .gacha-ticker-label { display: none; }
    .gacha-shell .gacha-ticker { padding: 9px 12px; }
    .gacha-shell .gacha-ticker-trackwrap {
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
    }
}

.gacha-shell .gacha-cloud-cell[hidden] { display: none !important; }

/* --- 十连/百连：全部结果铺平的全屏结果页 --- */
.gacha-reveal-sheet { position:fixed; inset:0; z-index:3000; display:grid; place-items:center; padding:24px; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .32s ease, visibility .32s ease; }
.gacha-reveal-sheet.is-active { opacity:1; visibility:visible; pointer-events:auto; }
.gacha-reveal-backdrop { position:absolute; inset:0; background:radial-gradient(circle at 50% 26%, rgba(99,102,241,.20), transparent 56%), rgba(7,9,14,.86); backdrop-filter:blur(10px); }
.gacha-reveal-panel { position:relative; z-index:2; display:flex; flex-direction:column; width:min(1020px,94vw); max-height:min(88vh,940px); padding:26px 26px 20px; background:linear-gradient(180deg,rgba(23,27,36,.98),rgba(14,17,23,.98)); border:1px solid rgba(255,255,255,.09); box-shadow:0 40px 120px rgba(0,0,0,.6); opacity:0; transform:translateY(18px); transition:transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s ease; }
.gacha-reveal-sheet.is-active .gacha-reveal-panel { opacity:1; transform:none; }
.gacha-reveal-head { position:relative; flex:0 0 auto; padding:0 46px 14px 0; }
.gacha-reveal-kicker { display:block; color:#8b93a7; font-size:11px; font-weight:700; letter-spacing:.18em; }
.gacha-reveal-x { position:absolute; top:-6px; right:-4px; display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:9px; background:rgba(255,255,255,.04); color:#8b93a7; font-size:15px; line-height:1; cursor:pointer; transition:background-color .15s ease, color .15s ease; }
.gacha-reveal-x:hover { background:rgba(255,255,255,.1); color:#fff; }
.gacha-reveal-head h2 { margin:8px 0 4px; color:#fff; font-size:24px; letter-spacing:-.01em; }
.gacha-reveal-head p { margin:0; color:rgba(255,255,255,.5); font-size:12px; }
.gacha-reveal-grid { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; padding:6px 6px 14px 2px; }
.gacha-reveal-card { position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:3px; min-height:104px; padding:13px 14px 12px; overflow:hidden; border:1px solid color-mix(in srgb,var(--gacha-color,#6b7280) 34%,rgba(255,255,255,.06)); background:linear-gradient(160deg,color-mix(in srgb,var(--gacha-color,#6b7280) 15%,#161a21),#12151b 64%); opacity:0; transform:translateY(22px) scale(.95); animation:gacha-reveal-in .5s cubic-bezier(.2,.85,.25,1) forwards; animation-delay:var(--delay,0ms); }
@keyframes gacha-reveal-in { to { opacity:1; transform:none; } }
.gacha-reveal-card.is-special { box-shadow:0 0 0 1px color-mix(in srgb,var(--gacha-color,#dc2626) 46%,transparent), 0 12px 40px color-mix(in srgb,var(--gacha-color,#dc2626) 22%,transparent); }
.gacha-reveal-card.is-special::before { content:""; position:absolute; inset:-45%; background:conic-gradient(from 0deg, transparent 0 62%, var(--gacha-color) 72%, transparent 82% 100%); opacity:.20; animation:gacha-reveal-ring 6s linear infinite; }
.gacha-reveal-card.is-special::after { content:""; position:absolute; top:-60%; left:-40%; width:55%; height:220%; background:linear-gradient(90deg, transparent, rgba(255,255,255,.26), transparent); transform:rotate(16deg); animation:gacha-reveal-sheen 3.6s ease-in-out infinite; animation-delay:calc(var(--delay,0ms) + .4s); }
.gacha-reveal-card > * { position:relative; z-index:1; }
.gacha-reveal-icon { display:grid; place-items:center; width:34px; height:34px; margin-bottom:4px; border-radius:9px; background:color-mix(in srgb,var(--gacha-color,#6b7280) 20%,rgba(255,255,255,.04)); color:var(--gacha-color,#e5e7eb); font-size:17px; font-weight:700; }
.gacha-reveal-icon-text { font-size:18px; line-height:1; }
.gacha-reveal-name { color:#f4f6fb; font-size:14.5px; font-weight:600; line-height:1.35; }
.gacha-reveal-meta { display:flex; align-items:center; gap:6px; margin-top:auto; color:#9aa3b5; font-size:10.5px; }
.gacha-reveal-meta b { padding:1px 7px; border-radius:999px; background:color-mix(in srgb,var(--gacha-color,#6b7280) 22%,transparent); color:var(--gacha-color,#e5e7eb); font-weight:700; letter-spacing:.04em; }
.gacha-reveal-meta em { font-style:normal; opacity:.75; }
.gacha-reveal-card.is-empty { justify-content:center; border-style:dashed; border-color:rgba(255,255,255,.08); background:rgba(255,255,255,.02); }
.gacha-reveal-card.is-empty .gacha-reveal-name { color:#94a3b8; font-weight:500; }
.gacha-reveal-card.is-empty .gacha-reveal-meta { margin-top:2px; color:#6b7280; }
.gacha-reveal-card.is-duplicate .gacha-reveal-meta em { color:#f59e0b; opacity:.9; }
.gacha-reveal-foot { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,.08); }
.gacha-reveal-foot span { color:#8b93a7; font-size:12px; }
.gacha-reveal-foot .gacha-btn { width:auto; min-width:148px; height:40px; font-size:13px; }
.gacha-reveal-open { overflow:hidden; }
.gacha-reveal[data-count="100"] .gacha-reveal-grid { grid-template-columns:repeat(auto-fill,minmax(122px,1fr)); }
.gacha-reveal[data-count="100"] .gacha-reveal-card { min-height:88px; padding:11px 12px; }
@keyframes gacha-reveal-ring { to { transform:rotate(360deg); } }
@keyframes gacha-reveal-sheen { 0%, 58% { left:-45%; } 86%, 100% { left:120%; } }
@media (max-width:720px) {
    .gacha-reveal-sheet { padding:12px; }
    .gacha-reveal-panel { width:100%; max-height:90vh; padding:18px 16px 14px; }
    .gacha-reveal-head h2 { font-size:19px; }
    .gacha-reveal-grid { grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:8px; }
    .gacha-reveal-card { min-height:92px; padding:11px 11px 10px; }
    .gacha-reveal-name { font-size:13px; }
    .gacha-reveal-foot .gacha-btn { min-width:128px; height:38px; }
}
@media (prefers-reduced-motion: reduce) {
    .gacha-reveal-card { animation:none; opacity:1; transform:none; }
    .gacha-reveal-card.is-special::before, .gacha-reveal-card.is-special::after { animation:none; }
}

/* 悬停：深灰底白字，与当前页签的墨色实底拉开层级。 */
.gacha-shell .gacha-tab:hover { color: #fff; background: #4b5563; text-decoration: none; }
.gacha-shell .gacha-tab.is-active:hover { color: var(--surface, #fff); background: var(--ink, #111827); }
.gacha-shell .gacha-tabs.is-ready .gacha-tab.is-active:hover { background: transparent; }

/* 百连抽：红色强调（浅色/暗色一致） */
.gacha-shell .gacha-draw-action.is-hundred { background: #dc2626; border-color: #dc2626; color: #fff; }
.gacha-shell .gacha-draw-action.is-hundred .gacha-draw-copy em { color: rgba(255, 255, 255, .8); }
.gacha-shell .gacha-draw-action.is-hundred:hover { background: #b91c1c; border-color: #b91c1c; }
html[data-theme="dark"] .gacha-shell .gacha-draw-action.is-hundred { background: #dc2626; border-color: #dc2626; color: #fff; }
html[data-theme="dark"] .gacha-shell .gacha-draw-action.is-hundred .gacha-draw-copy em { color: rgba(255, 255, 255, .8); }
html[data-theme="dark"] .gacha-shell .gacha-draw-action.is-hundred:hover { background: #b91c1c; border-color: #b91c1c; }
