/* TJK-Chess v16.0.13 — homepage/live/progress polish, exact daily cards, tactics border cleanup. */

/* QUICK START: all three actions have equal visual weight. */
.rebuild-quick-actions{width:min(100%,340px)!important}
.rebuild-quick-btn{background:#0879ff!important;border-color:#0879ff!important;color:#fff!important;box-shadow:none!important}
.rebuild-quick-btn:hover{background:#006ee9!important}

/* Daily Blind / Hidden / Deep cards use the same visual language as Daily studies. */
.rebuild-daily-visual{padding:20px!important}
.rebuild-visual-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:8px}
.rebuild-visual-card{border:0;background:transparent;padding:0;min-width:0;text-align:center;cursor:pointer}
.rebuild-visual-card .rebuild-board{width:100%;border:1px solid #c8d6e6}
.rebuild-visual-card strong{display:block;margin-top:8px;color:#314f77;font-size:13px;line-height:1.25}

/* Compact live multiboard: four actual live games, no oversized empty card. */
.rebuild-live-multiboard{min-height:0!important}
.rebuild-live-grid{align-items:start}
.rebuild-live-grid>.rebuild-empty{min-height:110px;display:grid;place-items:center;padding:18px}
.rebuild-live-game{min-height:0!important}

/* Progress redesign matching the approved mockup. */
.rebuild-progress{padding:24px!important}
.progress-v13-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:8px}
.progress-v13-stat{min-height:102px;border:1px solid #d8e2ef;border-radius:12px;background:#fff;display:flex;align-items:center;gap:14px;padding:17px 18px;box-sizing:border-box}
.progress-v13-stat>i{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:22px;background:#eaf3ff;color:#0b68df;flex:0 0 auto}
.progress-v13-stat>i.orange{background:#fff1e8;color:#ef7624}.progress-v13-stat>i.green{background:#ecf8ef;color:#24905a}.progress-v13-stat>i.purple{background:#f2edff;color:#6d56d8}
.progress-v13-stat b{display:block;color:#071d43;font-size:31px;line-height:1}.progress-v13-stat span{display:block;margin-top:7px;color:#6d84a5;font-size:13px}
.progress-v13-bottom{display:grid;grid-template-columns:minmax(0,1.22fr) minmax(300px,.98fr);gap:14px;margin-top:14px}
.progress-v13-activity,.progress-v13-streak,.progress-v13-summary{border:1px solid #d8e2ef;border-radius:12px;background:#fff;padding:16px 17px;box-sizing:border-box}
.progress-v13-activity h3,.progress-v13-streak h3,.progress-v13-summary h3{margin:0;color:#071d43;font-size:15px}.progress-v13-activity>p{margin:5px 0 10px;color:#7188a8;font-size:12px}
.progress-v13-bars{height:138px;display:grid;grid-template-columns:repeat(14,minmax(0,1fr));align-items:end;gap:6px;padding:5px 2px 0;border-bottom:1px solid #dfe7f1;background:repeating-linear-gradient(to top,transparent 0,transparent 44px,#edf2f8 45px,#edf2f8 46px)}
.progress-v13-bars>div{height:112px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px;min-width:0}.progress-v13-bars i{width:min(18px,72%);min-height:2px;border-radius:4px 4px 1px 1px;background:#3183ed}.progress-v13-bars span{font-size:8px;color:#8295b0;white-space:nowrap;transform:rotate(-55deg);transform-origin:center}
.progress-v13-side{display:grid;gap:14px}.progress-v13-streak>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}.progress-v13-streak small{color:#7f92ad;font-size:11px}.progress-v13-days{display:grid;grid-template-columns:repeat(14,1fr);gap:5px;margin-top:14px}.progress-v13-days span{aspect-ratio:1;border-radius:5px;background:#edf1f6;color:#8597b0;font-size:8px;display:grid;place-items:center}.progress-v13-days span.is-active{background:#2f83ed;color:#fff}
.progress-v13-summary>div{display:grid;grid-template-columns:repeat(3,1fr);margin-top:13px}.progress-v13-summary p{margin:0;padding:0 8px;text-align:center;border-right:1px solid #e0e8f2}.progress-v13-summary p:last-child{border-right:0}.progress-v13-summary i{display:grid;place-items:center;width:34px;height:34px;margin:0 auto 6px;border-radius:50%;background:#f2f6fb;font-style:normal}.progress-v13-summary span,.progress-v13-summary b{display:block}.progress-v13-summary span{font-size:10px;color:#7489a7}.progress-v13-summary b{margin-top:4px;font-size:14px;color:#071d43}

/* Tactics: one crisp 1px border only. The previous stack combined wrap background,
   outline, inset shadow and a physical right-edge element, which looked 3–5px thick. */
.puzzle-board-wrap{padding:0!important;background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;overflow:visible!important}
.puzzle-board{border:1px solid #243047!important;outline:0!important;box-shadow:none!important;box-sizing:border-box!important}
.puzzle-board::after,.puzzle-board-wrap::after,.puzzle-board-edge-right{display:none!important}
.puzzle-goal{margin-left:14px!important;margin-right:14px!important}

/* Full homepage dark mode. Board squares/pieces intentionally remain unchanged. */
html[data-theme="dark"] [data-view="home"],body.is-dark [data-view="home"]{background:#070b12!important;color:#f8fafc}
html[data-theme="dark"] .rebuild-card,body.is-dark .rebuild-card,
html[data-theme="dark"] .progress-v13-stat,body.is-dark .progress-v13-stat,
html[data-theme="dark"] .progress-v13-activity,body.is-dark .progress-v13-activity,
html[data-theme="dark"] .progress-v13-streak,body.is-dark .progress-v13-streak,
html[data-theme="dark"] .progress-v13-summary,body.is-dark .progress-v13-summary{background:#101722!important;border-color:#26354a!important;box-shadow:none!important}
html[data-theme="dark"] .rebuild-title-row h2,html[data-theme="dark"] .rebuild-title-row h3,html[data-theme="dark"] .rebuild-quick h3,html[data-theme="dark"] .progress-v13-stat b,html[data-theme="dark"] .progress-v13-activity h3,html[data-theme="dark"] .progress-v13-streak h3,html[data-theme="dark"] .progress-v13-summary h3,html[data-theme="dark"] .progress-v13-summary b,html[data-theme="dark"] .rebuild-broadcast-name strong,html[data-theme="dark"] .rebuild-live-game strong,html[data-theme="dark"] .rebuild-visual-card strong,body.is-dark .rebuild-title-row h2,body.is-dark .rebuild-title-row h3,body.is-dark .rebuild-quick h3,body.is-dark .progress-v13-stat b,body.is-dark .progress-v13-activity h3,body.is-dark .progress-v13-streak h3,body.is-dark .progress-v13-summary h3,body.is-dark .progress-v13-summary b{color:#f8fafc!important}
html[data-theme="dark"] .rebuild-quick p,html[data-theme="dark"] .progress-v13-stat span,html[data-theme="dark"] .progress-v13-activity>p,html[data-theme="dark"] .progress-v13-streak small,html[data-theme="dark"] .progress-v13-summary span,html[data-theme="dark"] .rebuild-live-game small,html[data-theme="dark"] .rebuild-empty,body.is-dark .rebuild-quick p,body.is-dark .progress-v13-stat span,body.is-dark .progress-v13-activity>p,body.is-dark .progress-v13-streak small,body.is-dark .progress-v13-summary span,body.is-dark .rebuild-live-game small,body.is-dark .rebuild-empty{color:#aebbd0!important}
html[data-theme="dark"] .rebuild-tactic-copy,html[data-theme="dark"] .rebuild-broadcast-name,html[data-theme="dark"] .rebuild-live-game,body.is-dark .rebuild-tactic-copy,body.is-dark .rebuild-broadcast-name,body.is-dark .rebuild-live-game{background:#151e2d!important;border-color:#2a3a52!important}
html[data-theme="dark"] .progress-v13-bars,body.is-dark .progress-v13-bars{border-color:#2a3a52!important;background:repeating-linear-gradient(to top,transparent 0,transparent 44px,#1d2838 45px,#1d2838 46px)!important}
html[data-theme="dark"] .progress-v13-days span,body.is-dark .progress-v13-days span{background:#202b3b;color:#b4c0d1}html[data-theme="dark"] .progress-v13-days span.is-active,body.is-dark .progress-v13-days span.is-active{background:#2777df;color:#fff}
html[data-theme="dark"] .progress-v13-summary p,body.is-dark .progress-v13-summary p{border-color:#2a3a52!important}
html[data-theme="dark"] .rebuild-board,body.is-dark .rebuild-board{background:#fff!important;border-color:#516174!important}

@media(max-width:900px){.progress-v13-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.progress-v13-bottom{grid-template-columns:1fr}.rebuild-visual-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.progress-v13-stats{grid-template-columns:1fr 1fr;gap:8px}.progress-v13-stat{min-height:86px;padding:12px;gap:9px}.progress-v13-stat>i{width:38px;height:38px;font-size:18px}.progress-v13-stat b{font-size:24px}.progress-v13-stat span{font-size:11px}.progress-v13-bars{overflow-x:auto;grid-template-columns:repeat(14,24px)}.progress-v13-days{overflow-x:auto;grid-template-columns:repeat(14,24px)}.progress-v13-summary>div{grid-template-columns:1fr}.progress-v13-summary p{border-right:0;border-bottom:1px solid #e0e8f2;padding:8px 0}.progress-v13-summary p:last-child{border-bottom:0}.rebuild-visual-grid{grid-template-columns:1fr 1fr 1fr;gap:7px}.rebuild-visual-card strong{font-size:11px}.rebuild-quick-actions{width:100%!important}}
