﻿:root {
    --bg: #edf1f5;
    --bg-soft: #f6f8fb;
    --bg-deep: #0f172a;
    --card: #ffffff;
    --card-soft: #f8fafc;
    --card-tint: #f2f6fb;
    --line: #d7e0ea;
    --line-soft: #e8eef5;
    --text: #18212f;
    --text-2: #334155;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --primary: #2563eb;
    --primary-deep: #1d4ed8;
    --primary-soft: #eaf2ff;
    --primary-soft-2: #dbeafe;
    --accent: #0f766e;
    --accent-soft: #e6fffb;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --danger-line: #fecaca;
    --warn: #d97706;
    --warn-soft: #fff7ed;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.12);
    --radius: 4px;
    --safe-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
    color: var(--text);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    padding-bottom: 162px;
}

button {
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
}

.hidden {
    display: none !important;
}

/* ===== App ===== */

.calc-app {
    max-width: 720px;
    margin: 0 auto;
    padding: 10px 10px 18px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 14px 14px 8px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 62%, #2563eb 100%);
    color: #eff6ff;
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -40px -50px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 68%);
    pointer-events: none;
}

.hero h1 {
    margin: 8px 0 4px;
    font-size: 22px;
    line-height: 1.1;
}

.hero p {
    max-width: 500px;
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(239, 246, 255, 0.84);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255,255,255,.14);
    font-size: 12px;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.hero-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.hero h1,
.hero p {
    position: relative;
    z-index: 1;
}

.hero-user {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #eff6ff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-user:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 800;
    flex: 0 0 auto;
}

.hero-user.logged .hero-user-avatar {
    background: linear-gradient(135deg, #f8fbff, #ffffff);
    color: var(--primary-deep);
}

.hero-user-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.hero-user-text strong {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 800;
    color: #eff6ff;
}

.hero-user-text em {
    margin-top: 3px;
    font-style: normal;
    font-size: 11px;
    color: rgba(239, 246, 255, 0.76);
}

.top-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.tab {
    flex: 1;
    min-width: 0;
    padding: 10px 10px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
    box-shadow: var(--shadow-xs);
    transition: all 0.18s ease;
}

.tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

/* ===== Common Buttons ===== */

.bonus-btn,
.ghost-btn,
.pass-btn,
.confirm-btn,
.more-btn,
.tag-btn,
.dan-btn,
.collapse-btn,
.sale-toggle {
    cursor: pointer;
    transition: all 0.18s ease;
}

.bonus-btn,
.ghost-btn,
.pass-btn {
    padding: 8px 13px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text-2);
    box-shadow: var(--shadow-xs);
}

.bonus-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.more-btn,
.handicap-cell,
.option-btn,
.tag-btn,
.dan-btn,
.config-card,
.config-tab,
.pass-chip,
.sheet-option,
.sale-toggle {
    border-radius: var(--radius);
}

.option-btn.selected,
.sheet-option.selected,
.tag-btn.selected,
.dan-btn.active,
.pass-chip.active,
.config-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.option-btn.selected .odds,
.option-btn.selected .label,
.sheet-option.selected .odds,
.tag-btn.selected .odds {
    color: rgba(255, 255, 255, 0.88);
}

/* ===== Sale Day / Sale Bar ===== */

.sale-day-group {
    margin-top: 6px;
}

.sale-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 0 2px;
}

.sale-day-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.sale-day-meta {
    font-size: 12px;
    color: var(--muted);
}

.sale-day-list {
    display: grid;
    gap: 6px;
}

.sale-bar-group {
    margin-bottom: 6px;
}

.sale-bar-group.collapsed {
    margin-bottom: 0;
}

.sale-bar {
    margin-top: 10px;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sale-bar-main,
.sale-bar-group .sale-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sale-bar-meta,
.sale-bar-group .sale-date {
    min-width: 0;
}

.sale-date {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.sale-bar-group .sale-date {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sale-bar-group .sale-date strong {
    font-size: 15px;
    line-height: 1.2;
}

.sale-bar-group .sale-date span {
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
    font-weight: normal;
}

.sale-sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.sale-bar-extra {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.sale-extra-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sale-extra-row-full {
    width: 100%;
    justify-content: space-between;
}

.sale-bar.collapsed .sale-bar-extra {
    display: none;
}

.collapse-toggle,
.sale-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 12px;
    background: var(--card-soft);
    border: 1px solid var(--line);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    border-radius: var(--radius);
}

.collapse-toggle:hover,
.sale-toggle:hover {
    background: #f1f5f9;
    border-color: #cdd8e5;
}

.sale-toggle span:last-child,
.collapse-arrow {
    display: inline-block;
    font-size: 11px;
    opacity: 0.75;
    transition: transform 0.2s ease;
}

.sale-bar.collapsed .collapse-arrow {
    transform: rotate(180deg);
}

.ai-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
    white-space: nowrap;
}

.ai-switch.disabled {
    opacity: 0.42;
    pointer-events: none;
}

.ai-switch input {
    display: none;
}

.ai-switch i {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #d5dee9;
    transition: background 0.2s ease;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.08);
}

.ai-switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
    transition: transform 0.2s ease;
}

.ai-switch input:checked + i {
    background: var(--primary);
}

.ai-switch input:checked + i::after {
    transform: translateX(18px);
}

.sale-ai-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sale-ai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.16);
}

.sale-ai-btn.ghost {
    background: #fff;
    color: var(--primary-deep);
    border-color: #bfd3ff;
    box-shadow: var(--shadow-xs);
}

.sale-ai-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== Match List ===== */

.match-list,
.detail-list,
.optimize-list,
.placeholder-grid {
    display: grid;
}

.match-list {
    gap: 10px;
    margin-top: -10px;
}

.detail-list,
.optimize-list {
    gap: 12px;
}

.placeholder-grid {
    gap: 10px;
    margin-top: 14px;
}

.match-card,
.empty-card,
.detail-card,
.optimize-card,
.sport-placeholder {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.match-card,
.empty-card {
    padding: 12px;
    border-radius: var(--radius);
}

.detail-card,
.optimize-card {
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 4px;
}

.sport-placeholder {
    padding: 18px;
    border-radius: var(--radius);
}

.empty-card {
    text-align: center;
    color: var(--muted);
    padding: 28px 18px;
    margin-top: 15px;
}

.empty-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.match-top,
.detail-head,
.optimize-head,
.sport-placeholder-head,
.card-actions,
.teams,
.sheet-group-header,
.config-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-top {
    gap: 8px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
    color: var(--muted);
}

.meta span,
.league-badge,
.pick-tag {
    border-radius: var(--radius);
    background: #f1f5f9;
}

.meta span,
.league-badge {
    padding: 3px 7px;
}

.league-badge {
    color: var(--primary-deep);
    font-weight: 700;
}

.selection-pill {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #cfe0ff;
}

.teams {
    gap: 8px;
    margin-top: 10px;
}

.team-block {
    flex: 1;
    min-width: 0;
}

.team-name {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text);
}

.team-sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
}

.vs-badge {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: var(--radius);
    background: #e8eef8;
    color: var(--primary-deep);
    font-size: 11px;
    font-weight: 800;
    border: 1px solid #d6e3fb;
}

/* ===== Play Board ===== */

.play-board {
    margin-top: 10px;
}

.play-type-label {
    display: none;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius);
    background: #eef4ff;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 700;
}

.odds-row {
    display: grid;
    grid-template-columns: 42px repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.handicap-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 48px;
    overflow: hidden;
    background: #f8fafc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--line-soft);
}

.handicap-cell.has-single {
    padding-top: 10px;
}

.handicap-cell.rq {
    background: #eef4ff;
    color: var(--primary-deep);
    border: 1px solid #dbe7ff;
}

.single-corner {
    position: absolute;
    left: -14px;
    top: 4px;
    width: 46px;
    text-align: center;
    transform: rotate(-45deg);
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.22);
}

.option-btn,
.sheet-option {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    text-align: center;
}

.option-btn {
    position: relative;
    overflow: hidden;
    min-height: 48px;
    padding: 8px 4px;
    border-radius: var(--radius);
    line-height: 1.25;
    transition: all 0.18s ease;
}

.option-btn:hover,
.sheet-option:hover {
    border-color: #bfd3ff;
    box-shadow: var(--shadow-xs);
}

.sheet-option {
    padding: 10px 4px;
    border-radius: var(--radius);
}

.option-btn .label,
.sheet-option .label {
    display: block;
    position: relative;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.option-btn .odds,
.sheet-option .odds {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
}

.option-btn.disabled,
.sheet-option:disabled {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e5ebf3;
    box-shadow: none;
}

.option-btn.disabled .label,
.option-btn.disabled .odds {
    color: #94a3b8;
}

/* ===== SPF 右侧更多玩法 ===== */

.spf-board-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 6px;
    align-items: stretch;
}

.spf-board-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spf-board-main .odds-row {
    margin-top: 0;
}

.more-btn-vertical {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: stretch;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #cfe0ff;
    color: var(--primary-deep);
    font-size: 11px;
    line-height: 1.15;
    font-weight: 800;
    box-sizing: border-box;
}

.more-btn-vertical span {
    display: block;
}

.card-actions.compact-note-only {
    margin-top: 8px;
}

.card-actions.compact-note-only .card-note {
    font-size: 11px;
    line-height: 1.4;
}

/* ===== AI 概率柱 ===== */

.option-btn.has-ai {
    padding-bottom: 18px;
}

.option-btn .ai-bar {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    overflow: hidden;
}

.option-btn .ai-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.2);
    transition: width 0.2s ease;
}

.option-btn .ai-text {
    position: absolute;
    right: 8px;
    bottom: 14px;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    color: var(--primary-deep);
    pointer-events: none;
}

.option-btn.ai-top1 .ai-fill {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.34), rgba(59, 130, 246, 0.4));
}

.option-btn.ai-top2 .ai-fill {
    background: rgba(59, 130, 246, 0.26);
}

.option-btn.selected .ai-bar {
    background: rgba(255, 255, 255, 0.18);
}

.option-btn.selected .ai-fill {
    background: rgba(255, 255, 255, 0.34);
}

.option-btn.selected.ai-top1 .ai-fill {
    background: rgba(255, 255, 255, 0.48);
}

.option-btn.selected.ai-top2 .ai-fill {
    background: rgba(255, 255, 255, 0.36);
}

.option-btn.selected .ai-text {
    color: rgba(255, 255, 255, 0.92);
}

/* ===== AI 角标 ===== */

.ai-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 4px;
    border-radius: 6px;
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.24);
}

.option-btn.selected .ai-badge {
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-deep);
}

/* ===== Card Actions ===== */

.card-actions {
    gap: 8px;
    margin-top: 10px;
}

.card-note {
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}

.more-btn {
    padding: 8px 12px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #cfe0ff;
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 700;
}

/* ===== Compact Boards ===== */

.compact-board .compact-grid {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-board .hafu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-score-group + .card-score-group {
    margin-top: 8px;
}

.card-score-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 8px 0 6px;
}

.card-score-head h3 {
    margin: 0;
    font-size: 12px;
    color: var(--text-2);
}

.card-score-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.play-board .sheet-group-header {
    margin-top: 10px;
}

.play-board .sheet-group-header h3 {
    font-size: 13px;
    color: var(--text-2);
}

.play-board .score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.card-score-grid .option-btn.has-ai,
.score-grid .option-btn.has-ai {
    padding-bottom: 16px;
}

.card-score-grid .option-btn .ai-bar,
.score-grid .option-btn .ai-bar {
    left: 5px;
    right: 5px;
    bottom: 5px;
    height: 5px;
}

.card-score-grid .option-btn .ai-text,
.score-grid .option-btn .ai-text {
    right: 6px;
    bottom: 12px;
    font-size: 9px;
}

.card-score-grid .ai-badge,
.score-grid .ai-badge {
    top: 2px;
    right: 2px;
    font-size: 8px;
    padding: 1px 3px;
}

/* ===== Bottom Bet Bar ===== */

.bet-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 10px 10px var(--safe-bottom);
    background: rgba(15, 23, 42, 0.94);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #f8fbff;
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.18);
}

.bet-bar-inner,
.bet-row {
    max-width: 720px;
    margin: 0 auto;
}

.bet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.top-row {
    align-items: center;
}

.middle-row {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(241, 245, 249, 0.8);
}

.middle-row strong {
    color: #fff;
    font-weight: 800;
}

.bottom-row {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 2.5fr;
    gap: 8px;
    align-items: stretch;
}

.selected-summary {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    color: #e2e8f0;
}

.pass-btn {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 34px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fbff;
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
}

.multiple-stepper {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
}

.multiple-stepper button,
.multiple-stepper span {
    min-width: 30px;
    text-align: center;
    padding: 7px 0;
    font-size: 14px;
}

.multiple-stepper button {
    color: #fff;
    font-weight: 700;
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fbff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    min-height: 36px;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 12px;
}

.confirm-btn {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.bottom-row .ghost-btn,
.bottom-row .confirm-btn {
    width: 100%;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.danger-btn {
    background: rgba(220, 38, 38, 0.12) !important;
    border: 1px solid rgba(248, 113, 113, 0.32) !important;
    color: #fecaca !important;
}

.danger-btn:hover {
    background: rgba(220, 38, 38, 0.18) !important;
    border-color: rgba(248, 113, 113, 0.4) !important;
    color: #ffe4e6 !important;
}

/* ===== Sheet ===== */

.sheet-mask {
    position: fixed;
    inset: 0;
    z-index: 29;
    background: rgba(15, 23, 42, 0.42);
}

.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    max-width: 720px;
    width: 100%;
    max-height: 86vh;
    margin: 0 auto;
    border-radius: var(--radius) var(--radius) 0 0;
    background: #f8fbff;
    box-shadow: 0 -20px 40px rgba(15, 23, 42, 0.16);
}

.sheet-header,
.sheet-footer {
    padding: 12px 12px 10px;
}

.sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
}

.sheet-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text);
}

.sheet-header p,
.sheet-selection {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.sheet-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: #eef2f7;
    color: var(--text-2);
    font-size: 18px;
    border: 1px solid var(--line);
}

.sheet-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 12px 0;
    scrollbar-width: none;
    min-height: 44px;
}

.sheet-tabs::-webkit-scrollbar {
    display: none;
}

.config-tab,
.pass-chip,
.tag-btn,
.dan-btn {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
}

.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 12px;
}

.sheet-group + .sheet-group,
.pass-section + .pass-section,
.dan-list,
.tip-block {
    margin-top: 16px;
}

.sheet-group-header {
    gap: 10px;
    margin-bottom: 10px;
}

.sheet-group-header h3,
.pass-section h3,
.tip-block h3 {
    margin: 0;
    font-size: 14px;
    color: var(--text);
}

.collapse-btn {
    padding: 7px 10px;
    border-radius: var(--radius);
    background: #f1f5f9;
    color: var(--text-2);
    font-size: 12px;
    border: 1px solid var(--line);
    font-weight: 700;
}

.sheet-grid.spf-grid {
    display: grid;
    gap: 10px;
}

.sheet-row {
    display: grid;
    grid-template-columns: 42px repeat(3, 1fr);
    gap: 6px;
}

.sheet-grid.option-grid,
.pass-grid,
.score-grid {
    display: grid;
    gap: 6px;
}

.sheet-grid.option-grid,
.score-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pass-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    align-items: stretch;
    justify-content: stretch;
}

.pass-chip {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 700;
    box-sizing: border-box;
}

.pass-chip.active {
    background: linear-gradient(135deg, var(--primary), #3b82f6) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.pass-chip.disabled,
.pass-chip:disabled,
.dan-btn.disabled {
    background: #f8fafc !important;
    color: #a0a8b3 !important;
    border-color: #e4ebf3 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.pass-chip.disabled:hover,
.pass-chip:disabled:hover {
    background: #f8fafc !important;
    color: #a0a8b3 !important;
    border-color: #e4ebf3 !important;
    transform: none !important;
}

.tip-block {
    padding: 14px;
    border-radius: var(--radius);
    background: #f8fbff;
    border: 1px solid #dbeafe;
    text-align: center;
}

.tip-block p,
.dan-limit-note,
.sheet-tip {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

.config-card {
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}

.config-meta {
    min-width: 0;
}

.config-title {
    font-size: 14px;
    font-weight: 700;
}

.config-sub,
.config-pick {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.config-pick {
    color: var(--primary-deep);
}

.compact-footer {
    border-top: 1px solid var(--line-soft);
}

.sheet-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.sheet-actions .ghost-btn,
.sheet-actions .confirm-btn {
    flex: 1;
}

/* ===== Toast ===== */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--safe-bottom) + 118px);
    transform: translateX(-50%) translateY(14px);
    z-index: 40;
    min-width: 140px;
    max-width: calc(100vw - 40px);
    padding: 12px 16px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    text-align: center;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Detail / Optimize ===== */

.detail-head,
.optimize-head {
    gap: 10px;
    margin-bottom: 8px;
}

.detail-title,
.optimize-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.detail-badge,
.optimize-badge,
.sport-placeholder-badge {
    flex: 0 0 auto;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-weight: 700;
    border: 1px solid #cfe0ff;
}

.detail-badge,
.optimize-badge {
    padding: 4px 8px;
    font-size: 12px;
}

.sport-placeholder-badge {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.detail-line {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-2);
}

.detail-line strong {
    color: var(--text);
}

.detail-subline,
.optimize-subline {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

.optimize-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.metric-box,
.range-item {
    border-radius: var(--radius);
    background: #f8fbff;
    border: 1px solid #e4edf7;
}

.metric-box {
    padding: 10px 8px;
    text-align: center;
}

.metric-label,
.range-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
}

.metric-value,
.range-value {
    display: block;
    margin-top: 4px;
    font-weight: 700;
    color: var(--primary-deep);
}

.metric-value {
    font-size: 13px;
}

.range-value {
    font-size: 14px;
}

.muted-tip,
.hit-note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

.pick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.pick-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #e3ebf4;
}

.pick-tag.dan {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    border-color: transparent;
}

.range-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.range-item {
    padding: 10px 12px;
}

.section-title-mini {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.detail-divider {
    height: 1px;
    margin: 12px 0;
    background: var(--line-soft);
}

/* ===== Placeholder ===== */

.sport-placeholder-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.sport-placeholder-desc {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
}

.placeholder-card {
    padding: 14px;
    border-radius: var(--radius);
    background: #f8fbff;
    border: 1px solid #e1ebf8;
}

.placeholder-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text);
}

.placeholder-card span {
    display: block;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

/* ===== iOS Safari 输入时页面突然放大：统一修复 ===== */

input,
select,
textarea {
    font-size: 16px !important;
    font-family: inherit;
    line-height: 1.2;
}

input[type="number"],
input[type="text"],
input[type="tel"] {
    font-size: 16px !important;
    min-height: 36px;
}

input,
select,
textarea,
button {
    -webkit-appearance: none;
    appearance: none;
    border-radius: var(--radius);
}

button,
.more-btn,
.more-btn-vertical,
.pass-btn,
.confirm-btn,
.ghost-btn,
.sale-toggle,
.bonus-btn,
.option-btn,
.sheet-option,
.pass-chip {
    touch-action: manipulation;
}

.multiple-stepper input {
    width: 44px;
    min-width: 44px;
    height: 32px;
    padding: 0 4px;
    border: 0;
    outline: none;
    background: transparent;
    color: #fff;
    text-align: center;
    font-size: 16px !important;
    line-height: 32px;
}

.bet-bar input,
.bet-bar select,
.bet-bar textarea {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.bet-bar input::placeholder,
.bet-bar textarea::placeholder {
    color: rgba(241, 245, 249, 0.55);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ===== Plan Detail V2 ===== */

.plan-detail-view {
    display: grid;
    gap: 12px;
}

.detail-header .detail-sub-meta {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.detail-block {
    padding: 14px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.detail-block-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.detail-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.split-badge {
    padding: 4px 8px;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #cfe0ff;
}

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

.summary-item {
    padding: 12px 10px;
    border-radius: var(--radius);
    background: #f8fbff;
    border: 1px solid #e4edf7;
}

.summary-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
}

.summary-value {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.2;
    color: var(--primary-deep);
    font-weight: 800;
}

.match-table {
    display: grid;
    gap: 10px;
}

.match-row {
    padding: 12px;
    border-radius: var(--radius);
    background: #fbfdff;
    border: 1px solid var(--line);
}

.match-row.is-dan {
    background: linear-gradient(135deg, #f8fbff, #eef5ff);
    border-color: #cfe0ff;
}

.match-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.match-row-head-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.lottery-id {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius);
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
}

.league-name {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.dan-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.match-row-teams {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text);
}

.match-pick-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.match-pick-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line-soft);
}

.play-name {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
}

.pick-name {
    min-width: 0;
    font-size: 13px;
    color: var(--text);
    font-weight: 700;
}

.pick-odds {
    text-align: right;
    font-size: 13px;
    color: var(--primary-deep);
    font-weight: 800;
}

.detail-note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
}

.plan-info-list {
    display: grid;
    gap: 8px;
}

.plan-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: #f8fbff;
    border: 1px solid #e4edf7;
}

.plan-info-label {
    font-size: 12px;
    color: var(--muted);
}

.plan-info-value {
    text-align: right;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

.split-list {
    display: grid;
    gap: 10px;
}

.split-card {
    padding: 12px;
    border-radius: var(--radius);
    background: #fbfdff;
    border: 1px solid var(--line);
}

.split-card-head,
.split-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.split-card-head {
    margin-bottom: 8px;
}

.split-card-head strong {
    font-size: 14px;
    color: var(--text);
}

.split-card-head span,
.split-card-foot span {
    font-size: 12px;
    color: var(--muted);
}

.split-card-content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
}

.split-card-foot {
    margin-top: 8px;
}

.detail-actions-block {
    padding-top: 12px;
}

.detail-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.detail-action-grid + .detail-action-grid {
    margin-top: 8px;
}

.detail-action-grid .ghost-btn,
.detail-action-grid .confirm-btn {
    width: 100%;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== Detail Sheet Compact Upgrade ===== */

.detail-compact-wrap {
    display: grid;
    gap: 10px;
}

.compact-card {
    padding: 10px 10px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.detail-summary-card.compact-card {
    padding: 10px;
}

.compact-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.compact-summary-item {
    padding: 8px 8px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
    border: 1px solid #e3ebf4;
    min-width: 0;
}

.compact-summary-item.strong {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #cfe0ff;
}

.compact-summary-label {
    display: block;
    font-size: 10px;
    line-height: 1.2;
    color: var(--muted);
}

.compact-summary-value {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.15;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-summary-item.strong .compact-summary-value {
    color: var(--primary-deep);
}

.compact-summary-note {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}

.compact-bet-card {
    padding: 10px;
}

.compact-detail-head {
    margin-bottom: 8px;
    gap: 8px;
    flex-wrap: nowrap;
}

.compact-detail-head strong {
    font-size: 14px;
    line-height: 1.2;
    color: var(--text);
    white-space: nowrap;
}

.compact-detail-head span {
    font-size: 12px;
    line-height: 1.2;
    color: var(--muted);
    white-space: nowrap;
    margin-left: auto;
}

.compact-picks {
    display: grid;
    gap: 6px;
}

.compact-pick-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 60px;
    gap: 6px;
    align-items: center;
    padding: 7px 8px;
    border-radius: var(--radius);
    background: #f8fbff;
    border: 1px solid #e4edf7;
}

.compact-pick-match {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
    opacity: 0.96;
}

.compact-pick-option {
    min-width: 0;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-pick-odds {
    text-align: right;
    font-size: 11px;
    line-height: 1.2;
    color: var(--primary-deep);
    font-weight: 800;
    white-space: nowrap;
}

.compact-bet-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #d7e3f1;
    font-size: 12px;
    line-height: 1.3;
    color: var(--text-2);
    flex-wrap: nowrap;
}

.compact-bet-foot span:last-child {
    color: var(--primary-deep);
    font-weight: 800;
}

.compact-bet-foot span {
    white-space: nowrap;
}

/* ===== Share Image Stable Color Fix ===== */

.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-card {
    background: #ffffff !important;
    border-color: #d8e2ee !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-summary-item {
    background: #f4f8fd !important;
    border: 1px solid #e3ebf4 !important;
    box-shadow: none !important;
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-summary-item.strong {
    background: #eaf2ff !important;
    border-color: #cfe0ff !important;
    box-shadow: none !important;
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-pick-row {
    background: #f8fbff !important;
    border: 1px solid #e4edf7 !important;
    box-shadow: none !important;
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-bet-foot {
    border-top: 1px dashed #d7e3f1 !important;
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-pick-match {
    color: #64748b !important;
    opacity: 1 !important;
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-pick-option {
    color: #18212f !important;
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-pick-odds,
.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-summary-item.strong .compact-summary-value,
.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-bet-foot span:last-child {
    color: #1d4ed8 !important;
}

/* ===== Share Image Mode ===== */

.sharing-shot-mode #detailSheetContent.sharing-shot-target {
    padding: 12px !important;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fa 100%);
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target .detail-compact-wrap {
    gap: 12px;
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target .detail-card,
.sharing-shot-mode #detailSheetContent.sharing-shot-target .compact-card {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target::before {
    content: "稳狗足球 · 竞彩方案";
    display: block;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 54%, #2563eb 100%);
    color: #eff6ff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.sharing-shot-mode #detailSheetContent.sharing-shot-target::after {
    content: "来自 稳狗足球 · jizhita.com";
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
}

/* ===== Responsive ===== */

@media (min-width: 421px) {
    .play-board .score-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 721px) {
    body {
        padding-bottom: 184px;
    }

    .sheet {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

@media (max-width: 420px) {
    .top-tabs {
        flex-wrap: wrap;
    }

    .bonus-btn {
        width: 100%;
    }

    .teams {
        align-items: flex-start;
    }

    .option-btn .label,
    .sheet-option .label {
        font-size: 12px;
    }

    .pass-grid,
    .sheet-grid.option-grid,
    .score-grid,
    .compact-board .compact-grid,
    .card-score-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .compact-board .hafu-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .odds-row,
    .sheet-row {
        grid-template-columns: 38px repeat(3, 1fr);
    }

    .match-card,
    .empty-card {
        padding: 10px;
    }

    .team-name {
        font-size: 15px;
    }

    .optimize-metrics,
    .range-box {
        grid-template-columns: 1fr;
    }

    .hero-top {
        align-items: center;
    }

    .hero-user {
        padding: 6px 8px 6px 6px;
    }

    .hero-user-text strong {
        max-width: 82px;
        font-size: 12px;
    }

    .hero-user-text em {
        font-size: 10px;
    }

    .sale-extra-row-full {
        justify-content: flex-start;
    }

    .sale-ai-actions {
        width: 100%;
    }

    .sale-ai-btn {
        flex: 1 1 0;
    }

    .top-row {
        gap: 6px;
    }

    .selected-summary {
        padding: 0 4px;
        font-size: 12px;
    }

    .pass-btn {
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
        font-size: 13px;
    }

    .bottom-row {
        grid-template-columns: 1fr 1fr 1.5fr;
    }

    .pass-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .pass-chip {
        min-height: 42px;
        padding: 9px 10px;
        font-size: 13px;
    }

    .spf-board-layout {
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 5px;
    }

    .more-btn-vertical {
        align-self: stretch;
        height: 100%;
        min-height: 0;
        padding: 6px 3px;
        font-size: 10px;
        gap: 2px;
    }

    .summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .summary-item {
        padding: 10px 8px;
    }

    .summary-value {
        font-size: 15px;
    }

    .match-row {
        padding: 10px;
    }

    .match-pick-item {
        grid-template-columns: 74px minmax(0, 1fr) 48px;
        gap: 6px;
        padding: 7px 8px;
    }

    .play-name,
    .pick-name,
    .pick-odds {
        font-size: 12px;
    }

    .plan-info-item {
        padding: 9px 10px;
    }

    .detail-action-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .detail-compact-wrap {
        gap: 8px;
    }

    .compact-card,
    .detail-summary-card.compact-card,
    .compact-bet-card {
        padding: 8px;
    }

    .compact-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .compact-summary-item {
        padding: 7px 7px;
    }

    .compact-summary-label {
        font-size: 10px;
    }

    .compact-summary-value {
        font-size: 12px;
    }

    .compact-summary-note {
        margin-top: 6px;
        font-size: 10px;
        line-height: 1.35;
    }

    .compact-detail-head {
        margin-bottom: 6px;
    }

    .compact-detail-head strong {
        font-size: 13px;
    }

    .compact-detail-head span {
        font-size: 11px;
    }

    .compact-picks {
        gap: 5px;
    }

    .compact-pick-row {
        grid-template-columns: 58px minmax(0, 1fr) 52px;
        gap: 5px;
        padding: 6px 7px;
    }

    .compact-pick-match {
        font-size: 10px;
    }

    .compact-pick-option {
        font-size: 11px;
    }

    .compact-pick-odds {
        font-size: 10px;
    }

    .compact-bet-foot {
        margin-top: 6px;
        padding-top: 6px;
        font-size: 11px;
        gap: 6px;
    }
}

.sheet .ghost-btn {
    background: #f1f5f9;
    color: var(--text-2);
    border: 1px solid var(--line);
}

.sheet .ghost-btn:hover {
    background: #eaf0f6;
    color: var(--text);
    border-color: #cfd9e5;
}
