.sm, .sm button, .sm select { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.sm { color: #e6e8f0; font-size: 13px; font-variant-numeric: tabular-nums; }
.sm button { font: inherit; cursor: pointer; }
.sm button:focus-visible, .sm select:focus-visible, .sm a:focus-visible { outline: 2px solid #a78bfa; outline-offset: 1px; }
.sm label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 11px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; color: #8a90a8; }
.sm select { background: #171a2e; color: #e6e8f0; border: 1px solid rgba(255, 255, 255, .15); border-radius: 9px;
    padding: 5px 8px; font-size: 12px; font-weight: 600; color-scheme: dark; height: 32px; }

.sm-card, .sm-head {
    background: #21243b; border: 1px solid rgba(139, 92, 246, .2); border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.sm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 22px; margin-bottom: 14px; }
.sm .sm-head h2 { margin: 0; font-size: 26px; font-weight: 800; color: #a78bfa !important; line-height: 1.1; }
.sm-sub { margin: 4px 0 0; color: #8a90a8; font-size: 13px; }
.sm-tabs { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; justify-content: center; }
.sm-tabs button, .sm-btn {
    height: 32px; padding: 0 12px; border-radius: 9px; background: #171a2e; color: #aab0c5;
    border: 1px solid rgba(255, 255, 255, .12); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.sm-head > .sm-btn { margin-left: auto; }
.sm-tabs button:hover, .sm-btn:hover { color: #fff; border-color: rgba(167, 139, 250, .6); }
.sm-tabs button.on { background: #8b5cf6; color: #fff; border-color: #8b5cf6; }

.sm-delay { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
    padding: 12px 18px; margin-bottom: 14px; border-radius: 14px; background: rgba(139, 92, 246, .12);
    border: 1px solid rgba(139, 92, 246, .35); color: #c9cde0; }
.sm-cta { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 9px;
    background: #8b5cf6; color: #fff !important; font-weight: 700; text-decoration: none; white-space: nowrap; }
.sm-cta:hover { background: #7c4ef0; }

.sm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; }
.sm-main { padding: 14px; min-width: 0; display: flex; flex-direction: column; } /* the chart takes the card's full height */
.sm-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sm-strikes { grid-column: 1 / -1; padding: 14px 18px; }
@media (max-width: 1100px) { .sm-grid { grid-template-columns: minmax(0, 1fr); } }

.sm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sm-bar h4 { margin: 0; font-size: 15px; font-weight: 700; color: #e6e8f0; }
.sm-bar h4 span { color: #8a90a8; font-weight: 500; font-size: 12px; margin-left: 6px; }
.sm-note { color: #8a90a8; font-size: 12px; }
.sm-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #aab0c5; font-size: 12px; }
.sm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sm-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.sm-legend i.dash { height: 0; border-top: 2px dashed; }
.sm-seg { display: inline-flex; border-radius: 9px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .15); }
.sm-seg button { background: #171a2e; color: #aab0c5; border: 0; height: 30px; padding: 0 11px; font-size: 12px; font-weight: 600; }
.sm-seg button.on { background: #8b5cf6; color: #fff; }

.sm-chart { position: relative; flex: 1 1 auto; min-height: 520px; }
.sm-empty { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center;
    color: #8a90a8; font-size: 14px; padding: 20px; z-index: 3; pointer-events: none; }
.sm-empty.on { display: flex; }
.sm-foot { margin-top: 8px; color: #8a90a8; font-size: 12px; }

.sm-reading { padding: 18px; }
.sm-pattern { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
    font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.sm-pattern.bull { background: rgba(34, 197, 94, .16); color: #4ade80; }
.sm-pattern.bear { background: rgba(239, 68, 68, .16); color: #f87171; }
.sm-pattern.neutral { background: rgba(167, 139, 250, .18); color: #c4b5fd; }
.sm-pattern.warn { background: rgba(250, 204, 21, .16); color: #facc15; }
.sm-early { font-size: 11px; font-weight: 600; color: #facc15; text-transform: uppercase; letter-spacing: .05em; }
.sm-read { color: #c9cde0; line-height: 1.55; margin: 0 0 12px; }
.sm-play { padding: 10px 12px; border-radius: 12px; background: #171a2e; margin-bottom: 8px; line-height: 1.5; }
.sm-play b { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: #8a90a8; margin-bottom: 2px; }
.sm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sm-stat { background: #171a2e; border-radius: 12px; padding: 8px 10px; }
.sm-stat small { display: block; color: #8a90a8; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sm-stat strong { font-size: 15px; }
.sm-stat.wide { grid-column: 1 / -1; }
.sm-up { color: #4ade80; } .sm-down { color: #f87171; }
.sm-flag { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(250, 204, 21, .12); color: #facc15; font-size: 12px; }
.sm-skel { height: 220px; border-radius: 12px; background: linear-gradient(90deg, #1b1e33, #262a45, #1b1e33); background-size: 200% 100%;
    animation: sm-shine 1.4s infinite; }
@keyframes sm-shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sm-skel { animation: none; } }

.sm-locked { padding: 18px; }
.sm-locked h4 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: #e6e8f0; }
.sm-locked p { color: #aab0c5; line-height: 1.5; }

#smScore { padding: 18px; }
#smScore h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #e6e8f0; }
.sm-score { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.sm-score th { color: #8a90a8; font-weight: 600; text-align: right; padding: 4px; }
.sm-score th:first-child, .sm-score td:first-child { text-align: left; }
.sm-score td { text-align: right; padding: 5px 4px; border-top: 1px solid rgba(255, 255, 255, .06); }

#smStrikes { overflow-x: auto; touch-action: pan-x; }
.sm-strike-wrap { position: relative; }
.sm-tip { position: absolute; z-index: 5; pointer-events: none; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px));
    background: #0f1124; color: #e6e8f0; border: 1px solid rgba(167, 139, 250, .55); border-radius: 10px; padding: 8px 11px;
    font-size: 12px; line-height: 1.55; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.sm-tip[hidden] { display: none; }
.sm-tip::before, .sm-tip::after { content: ''; position: absolute; left: var(--arrow, 50%); transform: translateX(-50%);
    border: solid transparent; }
.sm-tip::before { top: 100%; border-width: 8px; border-top-color: rgba(167, 139, 250, .55); }
.sm-tip::after { top: 100%; border-width: 7px; border-top-color: #0f1124; }
.sm-tip.below { transform: translate(-50%, 12px); }
.sm-tip.below::before { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: rgba(167, 139, 250, .55); }
.sm-tip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #0f1124; }
.sm-tip b { display: block; font-size: 13px; margin-bottom: 2px; }
.sm-tip span { display: flex; justify-content: space-between; gap: 14px; }
.sm-tip i { font-style: normal; color: #8a90a8; }
.sm-strike-note { margin: -4px 0 6px; }
.sm-tops { margin: 0 0 6px; font-size: 12px; color: #c9cde0; min-height: 18px; }
.sm-tops b { font-weight: 700; }
#smStrikes svg { display: block; }
#smStrikes text { fill: #8a90a8; font-size: 10px; font-family: 'Inter', sans-serif; }

.sm-guide.modal { z-index: 1200; }
.sm-guide .modal-content { background: #21243b; color: #c9cde0; border: 1px solid rgba(139, 92, 246, .3); border-radius: 20px; }
.sm-guide .modal-header { border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 16px 22px; }
.sm-guide .modal-title { color: #e6e8f0; font-weight: 700; font-size: 20px; margin: 0; }
.sm-guide .modal-body { padding: 18px 22px 22px; font-size: 14px; line-height: 1.6; }
.sm-guide section { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.sm-guide section:last-child { border-bottom: 0; }
.sm-guide h5 { color: #a78bfa; font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.sm-guide ul { padding-left: 20px; list-style: disc; }
.sm-guide li { display: list-item; margin-bottom: 5px; }
.sm-guide b { color: #e6e8f0; font-weight: 600; }
