/* Shared shell for the calendar, calculator and digit puzzle. */
body.tool-page{margin:0;padding:0;background:#f8f9fa;color:#2c3e50;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;line-height:1.6}
.tool-page *{box-sizing:border-box}
.tool-topbar{height:64px;padding:0 max(24px,calc((100% - 1120px)/2));display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #eceef2;font-size:14px}
.tool-topbar a{color:#667085;text-decoration:none}.tool-topbar .tool-brand{font-weight:700;color:#2c3e50;font-size:20px}


.tool-switcher{display:flex;justify-content:center;gap:8px;padding:16px;flex-wrap:wrap;border-bottom:1px solid #e9ecf2;background:#fff}
.tool-switcher a{padding:8px 16px;border-radius:8px;text-decoration:none;font-size:14px;color:#667085;white-space:nowrap}.tool-switcher a:hover{background:#f5f5fc}.tool-switcher a[aria-current]{color:#6257ac;background:#efedfa;font-weight:600}
.tool-footer{margin:0;padding:24px 16px;text-align:center;color:#9198a2;font-size:12px;line-height:1.6}
.tool-page a:focus-visible,.tool-page button:focus-visible,.tool-page input:focus-visible{outline:3px solid #8b80cf;outline-offset:3px}
.tool-page .calc-card,.tool-page .calendar,.tool-page .detail,.puzzle-content>.page{border:1px solid #e8ebf0;border-radius:12px;box-shadow:0 3px 16px #24365005;background:white}
.calculator-page .calculator-grid{max-width:1000px}.calculator-page .calc-card h3{color:#6558aa}.calculator-page .calc-card h3:before{background:#7567bb}.calculator-page .btn-calculate{background:#6e61b4}.calculator-page .btn-calculate:hover{background:#5e519f;box-shadow:0 4px 12px #6e61b425}
.calendar-page main{max-width:1168px;margin:32px auto 0;padding:0 24px}.calendar-page .data-note{margin-top:24px}.calendar-page main>footer{margin-bottom:0}
.puzzle-content{max-width:1000px;margin:32px auto 0;padding:0 20px}.puzzle-content>.page{padding:32px}.puzzle-content h2{margin:0 0 24px;font-size:24px;color:#6558aa}.puzzle-content h3{font-size:18px}.puzzle-content button{font-family:inherit;min-height:44px;border-radius:8px}.puzzle-content .mode-btn,.puzzle-content .submit-btn,.puzzle-content .modal-btn{background:#6e61b4}.puzzle-content .mode-btn:hover,.puzzle-content .submit-btn:hover,.puzzle-content .modal-btn:hover{background:#5e519f;transform:none}.puzzle-content input{min-width:0;min-height:44px;font-family:inherit;font-size:16px}.puzzle-content .player-section{min-width:0}.puzzle-content .feedback-mode-selector{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.puzzle-content .feedback-mode-selector label{margin:0;background:#f5f4fb;border-radius:8px;padding:10px 14px;display:flex;align-items:center;gap:6px}.puzzle-content .feedback-mode-selector input{min-height:0}.puzzle-content .modal-content{max-height:90vh;overflow:auto}.puzzle-content .modal-buttons{flex-wrap:wrap}
@media(max-width:768px){.tool-topbar{height:56px;padding:0 16px}.tool-switcher{gap:4px;padding:12px 8px}.tool-switcher a{font-size:13px;padding:8px 10px}.calendar-page main{margin-top:24px;padding:0 12px}.puzzle-content{margin-top:24px;padding:0 16px}.puzzle-content>.page{padding:20px}.puzzle-content .game-input-area input{max-width:100%}.puzzle-content .game-actions{align-items:stretch}.puzzle-content .mode-btn{max-width:none}.tool-footer{padding:24px 16px}}
