*,.a4-page{box-sizing:border-box}.a4-page,.app-layout,.meta-item,.page-meta,body{display:flex}.a4-page,.sidebar{background-color:#fff}.btn,.lang-btn{cursor:pointer;transition:.2s}*{margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background-color:#f3f4f6;color:#1f2937;flex-direction:column;min-height:100vh}.preview-container{flex:1;padding:2rem;overflow-y:auto;display:flex;flex-direction:column;align-items:center}.a4-page{width:210mm;min-height:297mm;padding:15mm;box-shadow:0 10px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);margin-bottom:2rem;position:relative;flex-direction:column}.page-header{width:100%;text-align:center;margin-bottom:20px;padding-bottom:10px;border-bottom:2px solid #374151}.page-title{font-size:24px;font-weight:700;letter-spacing:2px;color:#111827;margin-bottom:12px}.page-meta{justify-content:space-between;font-size:14px;color:#4b5563;padding:0 10px}.meta-item{align-items:flex-end}.underline-space{display:inline-block;border-bottom:1px solid #4b5563;min-width:80px;height:18px;margin-left:4px}.math-grid{display:grid;width:100%;gap:16px 20px;flex-grow:1;align-content:start}.grid-col-3{grid-template-columns:repeat(3,1fr)}.grid-col-2{grid-template-columns:repeat(2,1fr);gap:20px 30px}.problem-item{font-size:17px;font-family:"SF Mono",Menlo,Consolas,monospace;font-weight:600;padding:6px 0;display:flex;align-items:center;white-space:nowrap;overflow:hidden}.problem-no{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:13px;font-weight:400;color:#9ca3af;user-select:none;min-width:24px;display:inline-block}.blank-box{display:inline-block;min-width:36px;padding:0 4px;height:26px;border:1.5px solid #4b5563;border-radius:4px;vertical-align:middle;text-align:center;line-height:24px;font-size:18px}.answer-text{padding-left:5px;color:#dc2626;font-weight:700}.page-footer{text-align:center;font-size:11px;color:#9ca3af;margin-top:auto;padding-top:10px}.sidebar{width:340px;border-left:1px solid #e5e7eb;padding:1.5rem;display:flex;flex-direction:column;gap:1.25rem;box-shadow:-2px 0 10px rgba(0,0,0,.05);z-index:10}.sidebar-title{font-size:1.15rem;font-weight:700;color:#0f172a;flex:1}.btn,.form-label{font-size:.875rem}.btn,.form-label,.lang-btn{font-weight:600}.checkbox-group,.form-group,.radio-group{display:flex;flex-direction:column;gap:.5rem}.form-label{color:#374151}.checkbox-label,.radio-label{display:flex;align-items:center;gap:.5rem;font-size:.875rem;color:#4b5563;cursor:pointer}.checkbox-label input,.radio-label input{width:1rem;height:1rem;accent-color:#2563eb;cursor:pointer}.btn-group{display:flex;flex-direction:column;gap:.75rem;margin-top:1rem}.btn{width:100%;padding:.625rem 1rem;border-radius:.375rem;border:none;display:flex;align-items:center;justify-content:center;gap:.5rem}.btn-primary{background-color:#2563eb;color:#fff}.btn-primary:hover{background-color:#1d4ed8}.btn-success{background-color:#059669;color:#fff}.btn-success:hover{background-color:#047857}@media print{body{background-color:#fff;display:block}.footer-copyright,.sidebar{display:none!important}.preview-container{padding:0;overflow:visible}.a4-page{box-shadow:none;margin:0;width:210mm;height:297mm;page-break-after:always}.answer-text{color:#000!important}.problem-no{color:#a1a1aa!important}}.app-layout{flex:1;width:100%}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:.75rem;border-bottom:2px solid #f3f4f6}.lang-switcher-container{display:flex;align-items:center;background-color:#f1f5f9;border-radius:6px;padding:3px;width:91px}.lang-btn{border:none;background:0 0;padding:4px 10px;font-size:.75rem;color:#64748b;border-radius:4px}.lang-btn.active{background-color:#2563eb;color:#fff;box-shadow:0 1px 3px rgba(37,99,235,.3)}.footer-copyright{text-align:center;padding:16px 0;margin-top:auto;font-size:13px;color:#64748b;background-color:#fff;border-top:1px solid #e2e8f0;width:100%}@media (max-width:1024px){.app-layout{flex-direction:column-reverse}.sidebar{width:100%;border-left:none;border-bottom:1px solid #e2e8f0}.preview-container{padding:1rem;overflow-x:auto}}