/* SchoolPortal student-only Butterbear stamp cards – Phase 6 */
.sp-bear-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0 22px}
.sp-bear-summary>div{background:linear-gradient(135deg,#fffdf9,#fff2dc);border:1px solid #fbe5c7;padding:16px 18px;border-radius:20px;box-shadow:0 4px 18px #ce905311;display:flex;flex-direction:column;gap:7px;min-width:0}
.sp-bear-summary>div:nth-child(2){background:linear-gradient(135deg,#f7faff,#e6f4ff);border-color:#d8eafa}
.sp-bear-summary>div:nth-child(3){background:linear-gradient(135deg,#fffaff,#ffeaf2);border-color:#fae2ea}
.sp-bear-summary span{font-weight:800;font-size:12px;color:#9a7b59}
.sp-bear-summary strong{font-size:clamp(21px,2.6vw,30px);line-height:1.3;color:#795031;overflow-wrap:anywhere}
.sp-bear-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:20px}
.sp-bear-card{background:white;border:1px solid #f5dcca;border-radius:25px;overflow:hidden;box-shadow:0 10px 30px #aa6c3210;min-width:0}
.sp-bear-card-head{background:linear-gradient(120deg,#fff0e8,#fff9e9);border-bottom:1px solid #fae5d1;padding:17px;display:flex;gap:12px;align-items:center;min-height:86px}
.sp-bear-card--1 .sp-bear-card-head{background:linear-gradient(120deg,#e9f6ff,#f9fefe)}
.sp-bear-card--2 .sp-bear-card-head{background:linear-gradient(120deg,#eaf9ed,#fcfff7)}
.sp-bear-card--3 .sp-bear-card-head{background:linear-gradient(120deg,#f0e9ff,#fcfaff)}
.sp-bear-card--4 .sp-bear-card-head{background:linear-gradient(120deg,#fff5da,#fffaf1)}
.sp-bear-subject-icon{background:#fffdf7;border:1px solid #f5e3c4;flex:0 0 52px;width:52px;height:52px;border-radius:16px;display:flex;align-items:center;justify-content:center}
.sp-bear-subject-icon img{width:45px;height:45px;object-fit:contain}
.sp-bear-card-subject{min-width:0}
.sp-bear-card-subject span{font-size:11px;color:#bd8a66;font-weight:900}
.sp-bear-card-subject h3{font-size:18px;color:#533f40;font-weight:900;line-height:1.45;overflow-wrap:anywhere}
.sp-bear-card-body{padding:18px}
.sp-bear-card-stats{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:17px}
.sp-bear-card-stats>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.sp-bear-card-stats>div:last-child{text-align:right}
.sp-bear-card-stats span{font-size:11px;color:#ad9490;font-weight:800}
.sp-bear-card-stats strong{font-size:24px;font-weight:900;color:#dc8050;line-height:1.25;overflow-wrap:anywhere}
.sp-bear-card-stats strong.sp-bear-bonus{color:#239568}
.sp-bear-grid-wrap{min-width:0}
.sp-bear-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;width:100%}
.sp-bear-slot{position:relative;aspect-ratio:1/1;min-width:0;background:#fff9ef;border:1.5px solid #f5e1cb;border-radius:13px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.sp-bear-slot img{width:85%;height:85%;object-fit:contain;display:block;max-width:68px}
.sp-bear-slot--earned{background:linear-gradient(145deg,#fff6e2,#ffe7bd);border-color:#f3bd7b;box-shadow:0 2px 6px #e5ad6b22}
.sp-bear-slot--empty{background:#f8f7f6;border:1px dashed #e6dfda}
.sp-bear-slot--empty img{opacity:.18;filter:grayscale(1)}
.sp-bear-slot-check{position:absolute;right:2px;bottom:1px;border-radius:50%;background:#51b589;color:#fff;width:15px;height:15px;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:900;border:1px solid #fff}
.sp-bear-slot-number{position:absolute;bottom:1px;right:4px;font-size:9px;color:#9ba1aa;font-weight:900}
.sp-bear-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:11px 0 2px}
.sp-bear-page-button{padding:6px 10px;font-size:11px;font-weight:900;color:#ae7654;background:#fff9f1;border:1px solid #f5ddc6;border-radius:10px}
.sp-bear-page-button:disabled{opacity:.35;cursor:not-allowed}
.sp-bear-page-counter{font-size:10px;font-weight:800;color:#96847a;text-align:center}
.sp-bear-progress-head{display:flex;justify-content:space-between;gap:9px;font-size:12px;font-weight:800;color:#80675a;margin-top:12px}
.sp-bear-meter{height:9px;border-radius:10px;overflow:hidden;background:#f0e7e6;border:1px solid #ebe2df;margin-top:5px}
.sp-bear-meter-fill{background:linear-gradient(90deg,#ffb957,#f1848f);height:100%;border-radius:10px;transition:width .35s ease}
.sp-bear-help{margin-top:9px;font-size:12px;color:#ba7d63;font-weight:800;line-height:1.5}
.sp-bear-card-footer{margin-top:14px;border-top:1px dashed #f5dfce;padding-top:13px;display:flex;flex-direction:column;gap:4px}
.sp-bear-card-footer span:first-child{font-size:13px;font-weight:900;color:#986042}
.sp-bear-card-footer span:last-child{font-size:11px;font-weight:700;color:#99909a}
.sp-bear-home-preview{margin-top:24px;background:#fff;border:1px solid #f7dbc6;border-radius:28px;overflow:hidden;box-shadow:0 10px 30px #aa6c3211}
.sp-bear-home-head{padding:16px 20px;background:linear-gradient(90deg,#fff1e6,#fffaf1);display:flex;align-items:center;justify-content:space-between;gap:12px}
.sp-bear-home-title{display:flex;align-items:center;gap:12px;min-width:0}
.sp-bear-home-title>img{width:46px;height:46px;object-fit:contain;flex-shrink:0}
.sp-bear-home-title h3{font-size:17px;font-weight:900;color:#754933}
.sp-bear-home-title p{font-size:11px;line-height:1.55;color:#a8846c;font-weight:700;margin-top:3px}
.sp-bear-open{font-weight:900;font-size:11px;color:#a76543;white-space:nowrap;border:1px solid #efceba;padding:8px 12px;border-radius:12px;background:white}
.sp-bear-home-body{padding:14px 20px 20px}
.sp-bear-subject-picker{display:flex;gap:7px;overflow-x:auto;padding-bottom:12px}
.sp-bear-subject-chip{white-space:nowrap;border:1px solid #e8ddda;border-radius:100px;background:#fff;padding:7px 11px;color:#997e76;font-size:12px;font-weight:900}
.sp-bear-subject-chip--active{background:#ffe9d4;border-color:#e6a66d;color:#9f5928}
.sp-bear-home-inner{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:15px;align-items:center}
.sp-bear-home-info{border-radius:18px;background:#fff8ec;padding:18px;min-width:0}
.sp-bear-kicker{font-size:11px;font-weight:900;color:#bc7c57}
.sp-bear-home-info h4{font-weight:900;font-size:19px;color:#805332;margin:3px 0 5px;line-height:1.5}
.sp-bear-home-info p{font-weight:800;font-size:12px;color:#9b7b67}
.sp-bear-rule{font-size:12px;color:#b47141;font-weight:900;margin-top:14px;border-radius:10px;background:#ffebd4;padding:8px 10px}
.sp-bear-home-stamps{min-width:0}
.sp-bear-grid--compact{grid-template-columns:repeat(5,minmax(0,1fr))}
.sp-bear-grid--compact .sp-bear-slot{border-radius:10px}
.sp-bear-history{margin-top:25px;background:#fff;border:1px solid #efe8ee;border-radius:24px;padding:20px}
.sp-bear-history-header{display:flex;align-items:start;justify-content:space-between;gap:12px}
.sp-bear-history-header h3{color:#675060;font-size:19px;font-weight:900}
.sp-bear-history-header p{font-size:12px;line-height:1.6;font-weight:700;color:#94838f;margin-top:4px}
.sp-bear-history-tabs{display:flex;gap:5px;background:#f8f5f7;padding:4px;border-radius:12px;flex-shrink:0}
.sp-bear-history-tabs button{border-radius:9px;padding:8px 10px;font-size:11px;font-weight:900;color:#887c83}
.sp-bear-history-tabs button.active{background:#fff;border:1px solid #f1d6e4;color:#b6527d;box-shadow:0 2px 8px #ab6b8322}
.sp-bear-history-list{margin-top:14px;display:flex;flex-direction:column;gap:9px}
.sp-bear-history-row{display:flex;align-items:center;gap:11px;padding:12px;background:#fffaf9;border:1px solid #f5e8e2;border-radius:15px;min-width:0}
.sp-bear-history-emblem{font-size:23px;flex:0 0 28px}
.sp-bear-history-details{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
.sp-bear-history-details strong{font-size:13px;font-weight:900;color:#735762;overflow-wrap:anywhere}
.sp-bear-history-details span{font-size:10px;font-weight:700;color:#a39a9d}
.sp-bear-history-values{display:flex;flex-direction:column;align-items:end;gap:3px;text-align:right;min-width:83px}
.sp-bear-history-values strong{color:#c57747;font-weight:900;font-size:13px}
.sp-bear-history-values strong.negative{color:#c25b6b}
.sp-bear-history-values span{font-size:10px;color:#2a986d;font-weight:900}
.sp-bear-empty{padding:22px;text-align:center;font-weight:800;font-size:13px;color:#a4989d}
@media(max-width:850px){.sp-bear-cards{grid-template-columns:1fr}.sp-bear-home-inner{grid-template-columns:1fr}.sp-bear-home-head{flex-wrap:wrap}}
@media(max-width:520px){.sp-bear-summary{gap:7px}.sp-bear-summary>div{padding:11px;border-radius:14px}.sp-bear-summary span{font-size:10px}.sp-bear-summary strong{font-size:18px}.sp-bear-card-body{padding:14px}.sp-bear-card-head{padding:14px}.sp-bear-home-body{padding:12px}.sp-bear-home-head{padding:14px}.sp-bear-home-title h3{font-size:15px}.sp-bear-home-preview{border-radius:18px}.sp-bear-history{padding:13px}.sp-bear-history-header{flex-direction:column}.sp-bear-history-tabs{width:100%}.sp-bear-history-tabs button{flex:1}.sp-bear-grid{gap:5px}}
@media(prefers-reduced-motion:reduce){.sp-bear-meter-fill{transition:none}}
