.sggame-wrap {
    --sggame-primary: #667eea;
    --sggame-secondary: #764ba2;
    --sggame-accent: #f5576c;
    --sggame-success: #27ae60;
    --sggame-ball-cols: 7;
    --sggame-ball-cols-m: 5;
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 0 36px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #1f2937;
}

.sggame-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    background: #fff;
    margin-bottom: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.sggame-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--sggame-primary);
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 999px;
    padding: 4px 10px;
}

.sggame-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: #111827; }
.sggame-sub { margin: 0; color: #6b7280; font-size: 14px; line-height: 1.7; }
.sggame-balance-box {
    min-width: 170px;
    text-align: right;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}
.sggame-balance-box strong { display: block; font-size: 28px; line-height: 1.1; color: #111827; }
.sggame-balance-tip { display: block; margin-top: 4px; font-size: 12px; color: #94a3b8; }
.sggame-muted { color: #64748b; font-size: 12px; }

.sggame-guide-wrap { margin-bottom: 16px; }
.sggame-guide-toggle { margin-bottom: 12px; }

.sggame-intro-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.sggame-intro-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 18px 18px 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.sggame-intro-card-main {
    border-color: rgba(102, 126, 234, 0.2);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.sggame-intro-card h3,
.sggame-card h4,
.sggame-pick-panel-head h4,
.sggame-section-copy h3 {
    margin: 0 0 10px;
    font-size: 17px;
    color: #1a1a2e;
    letter-spacing: -.3px;
}
.sggame-intro-card h3 i,
.sggame-card h4 i,
.sggame-pick-panel-head h4 i,
.sggame-section-copy h3 i {
    margin-right: 8px;
    opacity: .7;
}

.sggame-intro-text,
.sggame-card-desc,
.sggame-pick-panel-head p {
    margin: 0;
    font-size: 13.5px;
    color: #5a6a8a;
    line-height: 1.7;
}

.sggame-guide-list,
.sggame-note-list {
    margin: 0;
    padding-left: 18px;
    color: #475569;
    font-size: 13px;
    line-height: 1.9;
}

.sggame-note-list strong,
.sggame-guide-list strong { color: #111827; }

.sggame-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sggame-tab {
    flex: 1;
    min-width: 120px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #475569;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sggame-tab.active,
.sggame-tab:hover {
    border-color: var(--sggame-primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.05));
    color: var(--sggame-primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.sggame-panel {
    display: none;
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    border: 1px solid #e8edf5;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

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

.sggame-panel-head,
.sggame-section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.sggame-rules { margin: 0; font-size: 14px; color: #64748b; line-height: 1.8; max-width: 620px; }

.sggame-lottery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.sggame-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #475569;
    font-size: 12px;
}

.sggame-stat-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.sggame-stat-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    min-width: 150px;
}
.sggame-stat-card span { display: block; font-size: 12px; color: #64748b; margin-bottom: 6px; }
.sggame-stat-card strong { display: block; font-size: 20px; color: #111827; }
.sggame-stat-card small { display: block; margin-top: 6px; font-size: 12px; color: #94a3b8; line-height: 1.5; }

.sggame-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.sggame-card,
.sggame-pick-panel {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,.04);
    transition: box-shadow .2s ease;
}
.sggame-card:hover,
.sggame-pick-panel:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
}

.sggame-pick-panel { margin-bottom: 16px; }
.sggame-pick-panel-head { margin-bottom: 14px; }

.sggame-selected-panel {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px dashed #d7dee8;
    border-radius: 12px;
    background: #f8fafc;
}
.sggame-selected-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.sggame-selected-head h5 {
    margin: 0;
    font-size: 14px;
    color: #111827;
}
.sggame-selected-progress {
    font-size: 12px;
    color: #64748b;
}
.sggame-selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    align-items: center;
}
.sggame-selected-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sggame-primary), var(--sggame-secondary));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.sggame-selected-empty {
    font-size: 13px;
    color: #94a3b8;
}
.sggame-selected-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.sggame-ball-grid {
    display: grid;
    grid-template-columns: repeat(var(--sggame-ball-cols), 1fr);
    gap: 10px;
}

.sggame-ball {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
    font-size: 14px;
    color: #334155;
}

.sggame-ball:hover {
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(102, 126, 234, 0.08);
}

.sggame-ball.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--sggame-primary), var(--sggame-secondary));
    color: #fff;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.22);
}

.sggame-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
}

.sggame-toolbar-lottery { align-items: center; }
.sggame-pay-hint {
    flex: 1;
    min-width: 260px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.7;
}

.sggame-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #64748b; }
.sggame-field strong { font-size: 20px; color: #111827; }
.sggame-field small { font-size: 12px; color: #94a3b8; }
.sggame-range-inputs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.sggame-range-inputs em {
    color: #94a3b8;
    font-style: normal;
}

.sggame-select,
.sggame-input {
    padding: 10px 12px;
    border: 1px solid #d7dee8;
    border-radius: 10px;
    font-size: 14px;
    min-width: 100px;
    background: #fff;
    color: #334155;
}

.sggame-btn {
    border: 1px solid #d7dee8;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    background: #fff;
    color: #334155;
}

.sggame-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
.sggame-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.sggame-btn-primary { border-color: transparent; background: linear-gradient(135deg, var(--sggame-primary, #667eea) 0%, var(--sggame-secondary, #764ba2) 100%); color: #fff; box-shadow: 0 2px 8px rgba(102,126,234,.3); }
.sggame-btn-primary:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,.4); }
.sggame-btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: 0 1px 4px rgba(102,126,234,.2); }
.sggame-btn-success { border-color: transparent; background: linear-gradient(135deg, #11998e, var(--sggame-success)); color: #fff; }
.sggame-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    color: #334155;
}

.sggame-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.sggame-list {
    max-height: 320px;
    overflow-y: auto;
    margin-top: 12px;
    border-top: 1px solid #edf2f7;
}

.sggame-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    gap: 8px;
    color: #475569;
    transition: background .15s;
}
.sggame-list-item:hover { background: #f8fafc; }

.sggame-list-item:last-child { border-bottom: none; }
.sggame-list-empty { text-align: center; color: #94a3b8; padding: 26px 10px; font-size: 13px; }
.sggame-list-item-action { flex-wrap: wrap; }
.sggame-list-item-action span { flex: 1; min-width: 0; }

.sggame-history-row,
.sggame-ticket-row {
    padding: 14px 6px;
    border-bottom: 1px solid #edf2f7;
}
.sggame-history-row:last-child,
.sggame-ticket-row:last-child {
    border-bottom: none;
}
.sggame-history-main,
.sggame-ticket-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.sggame-history-meta,
.sggame-ticket-meta {
    font-size: 12px;
    color: #64748b;
    line-height: 1.7;
}
.sggame-history-balls,
.sggame-ticket-balls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sggame-btn-accent {
    border-color: transparent;
    background: linear-gradient(135deg, var(--sggame-accent), #ff8a80);
    color: #fff;
}

.sggame-rps-direct { margin-bottom: 16px; }
.sggame-rps-first-choice-box { margin-bottom: 16px; }
.sggame-inline-choices {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #475569;
}
.sggame-inline-choices label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
}
.sggame-card-inner h4 { margin: 0 0 10px; font-size: 14px; color: #111827; }

.sggame-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(102,126,234,0.1);
    color: var(--sggame-primary);
    font-size: 12px;
    font-weight: 600;
}
.sggame-badge-win{background:rgba(39,174,96,.12);color:#27ae60}
.sggame-badge-lose{background:rgba(231,76,60,.12);color:#e74c3c}
.sggame-badge-draw{background:rgba(243,156,18,.12);color:#f39c12}

.sggame-room-box {
    margin-top: 16px;
    padding: 16px;
    border: 1px dashed #cdd7e3;
    border-radius: 12px;
    background: #fbfdff;
}

.sggame-room-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.sggame-rps-choices { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 16px 0; }
.sggame-choice { min-width: 90px; }
.sggame-result { text-align: center; font-weight: 600; color: var(--sggame-primary); }
.sggame-log .sggame-list-item { font-family: monospace; }

.sggame-ball-sm {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--sggame-primary);
    font-size: 11px;
    font-weight: 700;
    margin: 0 2px;
}

.sggame-disclaimer {
    padding: 16px 18px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.8;
}

.sggame-disclaimer p { margin: 0; }
.hidden { display: none !important; }

.sggame-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(30,30,30,0.92);
    color: #fff;
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(.4,0,.2,1), transform 0.25s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    max-width: 340px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    backdrop-filter: blur(8px);
}
.sggame-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sggame-toast.success { background: rgba(39,174,96,0.95); }
.sggame-toast.error { background: rgba(231,76,60,0.95); }

.sggame-rps-result-detail {
    margin-top: 12px;
    padding: 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e8edf5;
    text-align: center;
}
.sggame-rps-result-detail .result-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
.sggame-rps-result-detail .result-title.win { color: #27ae60; }
.sggame-rps-result-detail .result-title.lose { color: #e74c3c; }
.sggame-rps-result-detail .result-title.draw { color: #667eea; }
.sggame-rps-result-detail .result-choices {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 12px 0;
    font-size: 15px;
    color: #475569;
}
.sggame-rps-result-detail .result-choices .vs {
    font-weight: 700;
    color: #94a3b8;
    font-size: 13px;
}
.sggame-rps-result-detail .result-score {
    font-size: 16px;
    font-weight: 700;
    margin-top: 8px;
}
.sggame-rps-result-detail .result-score.gain { color: #27ae60; }
.sggame-rps-result-detail .result-score.loss { color: #e74c3c; }

.sggame-share-box {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
    border: 1px dashed rgba(102,126,234,0.3);
    border-radius: 12px;
    margin-bottom: 16px;
}
.sggame-share-box .sggame-input {
    flex: 1;
    min-width: 0;
}
.sggame-share-box .sggame-share-label {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}

.sggame-rps-history-box {
    margin-top: 16px;
}
.sggame-rps-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    font-size: 13px;
    gap: 10px;
    flex-wrap: wrap;
}
.sggame-rps-history-item:last-child { border-bottom: none; }
.sggame-rps-history-item .history-info { flex: 1; min-width: 0; color: #475569; }
.sggame-rps-history-item .history-info strong { color: #111827; }
.sggame-rps-history-item .history-result {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.sggame-rps-history-item .history-result.win { background: rgba(39,174,96,0.1); color: #27ae60; }
.sggame-rps-history-item .history-result.lose { background: rgba(231,76,60,0.1); color: #e74c3c; }
.sggame-rps-history-item .history-result.draw { background: rgba(102,126,234,0.1); color: #667eea; }

.sggame-mine-rooms .sggame-list-item {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fcfdff;
    border: 1px solid #e8edf5;
    border-bottom: 1px solid #e8edf5;
    transition: all 0.15s ease;
}
.sggame-mine-rooms .sggame-list-item:hover {
    border-color: rgba(102,126,234,0.3);
    box-shadow: 0 4px 12px rgba(102,126,234,0.08);
}
.sggame-mine-rooms .sggame-list-item:last-child {
    border-bottom: 1px solid #e8edf5;
}

.sggame-room-list .sggame-list-item {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fcfdff;
    border: 1px solid #e8edf5;
    border-bottom: 1px solid #e8edf5;
    transition: all 0.15s ease;
}
.sggame-room-list .sggame-list-item:hover {
    border-color: rgba(102,126,234,0.3);
    box-shadow: 0 4px 12px rgba(102,126,234,0.08);
}
.sggame-room-list .sggame-list-item:last-child {
    border-bottom: 1px solid #e8edf5;
}

.sggame-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.sggame-modal {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    text-align: center;
}
.sggame-modal h4 { margin: 0 0 12px; }
.sggame-modal p { margin: 0 0 18px; color: #666; line-height: 1.5; }
.sggame-modal-actions { display: flex !important; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sggame-modal-actions .sggame-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 110px !important;
    min-height: 42px !important;
    padding: 10px 18px !important;
    border: 0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    text-shadow: none !important;
    cursor: pointer;
}
.sggame-modal-actions .sggame-modal-cancel {
    background: #e9ecef !important;
    color: #333 !important;
}
.sggame-modal-actions .sggame-modal-ok,
.sggame-modal-actions .sggame-btn-primary {
    background: linear-gradient(135deg, var(--sggame-primary), var(--sggame-secondary)) !important;
    color: #fff !important;
}

@media (max-width: 920px) {
    .sggame-header {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
    .sggame-balance-box {
        min-width: 0;
        width: 100%;
        text-align: left;
    }
    .sggame-intro-grid,
    .sggame-info-grid,
    .sggame-split {
        grid-template-columns: 1fr;
    }
}

.sggame-mine-players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e8edf5;
}
.sggame-mine-player-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
}

.sggame-room-players {
    margin: 8px 0 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e8edf5;
    font-size: 14px;
    text-align: center;
}

.sggame-share-code-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.sggame-share-code-box code,
.sggame-share-code-inline {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #475569;
    user-select: all;
}
.sggame-copy-share {
    color: var(--sggame-primary);
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}
.sggame-copy-share:hover { text-decoration: underline; }

.sggame-wheel-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 30px 0;
}
.sggame-wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
}
#sggame-wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25), 0 0 0 8px #f1f5f9, 0 0 0 12px var(--sggame-primary);
}
.sggame-wheel-pointer {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    color: var(--sggame-accent, #f5576c);
    filter: drop-shadow(0 3px 6px rgba(245, 87, 108, 0.4));
    z-index: 10;
}
.sggame-btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 10px;
}
.sggame-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8edf5;
}

.sggame-dice-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
}
.sggame-dice-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e8edf5;
}
.sggame-dice-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: #fff;
    min-height: 48px;
    font-size: 14px;
    transition: all 0.2s;
}
.sggame-dice-cell.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.08));
    border-color: var(--sggame-primary);
    box-shadow: 0 4px 12px rgba(102,126,234,0.2);
    transform: scale(1.05);
}
.sggame-dice-marker {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--sggame-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(102,126,234,0.3);
}
.sggame-dice-cell-num {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}
.sggame-dice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.sggame-dice-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--sggame-primary), var(--sggame-secondary, #764ba2));
    color: #fff;
    border-radius: 10px;
    font-size: 24px;
    font-weight: 700;
    min-width: 80px;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(102,126,234,0.2);
}

@media (max-width: 768px) {
    .sggame-wrap { padding: 12px 0 26px; }
    .sggame-header,
    .sggame-panel,
    .sggame-intro-card,
    .sggame-card,
    .sggame-pick-panel { padding: 16px; }
    .sggame-ball-grid { grid-template-columns: repeat(var(--sggame-ball-cols-m), 1fr); }
    .sggame-toolbar { flex-direction: column; align-items: stretch; }
    .sggame-rps-choices { flex-direction: column; }
    .sggame-pay-hint { min-width: 0; }
    .sggame-toast { top: 60px; max-width: 85vw; font-size: 13px; }
    .sggame-share-box { flex-direction: column; align-items: stretch; }
    .sggame-share-box .sggame-share-label { white-space: normal; }
    .sggame-wheel-container { width: 280px; height: 280px; }
    .sggame-dice-board { grid-template-columns: repeat(5, 1fr); }
    .sggame-dice-controls { flex-direction: column; }
}
