:root{font-synthesis:none;text-rendering:optimizelegibility;color:#1f2937;background:#f6f7f9;font-family:Inter,Noto Sans JP,Hiragino Kaku Gothic ProN,Yu Gothic,Meiryo,sans-serif}*{box-sizing:border-box}html{min-width:320px;min-height:100%}body{background:#f6f7f9;min-width:320px;min-height:100vh;margin:0}button,textarea,select,input{font:inherit}button,select,input[type=radio],input[type=checkbox]{cursor:pointer}button:disabled,select:disabled,textarea:disabled,input:disabled{cursor:not-allowed;opacity:.65}.app-shell{flex-direction:column;min-height:100vh;display:flex}.app-header{background:#fff;border-bottom:1px solid #e5e7eb;padding:2rem 1.5rem 1.5rem}.app-header h1{color:#111827;max-width:1120px;margin:0 auto;font-size:clamp(1.5rem,4vw,2rem);line-height:1.3}.app-header p{color:#4b5563;max-width:1120px;margin:.75rem auto 0;line-height:1.7}.app-main{flex:1;width:100%;max-width:1120px;margin:0 auto;padding:2rem 1.5rem 3rem}.input-card,.result-section{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:1.25rem;box-shadow:0 1px 3px #0000000a}.form-section{margin-bottom:1rem}.field-label{color:#111827;margin-bottom:.5rem;font-weight:600;display:block}.select-control{color:#111827;background:#fff;border:1px solid #d1d5db;border-radius:8px;width:100%;min-height:2.75rem;padding:.6rem .75rem}.select-control:focus,.prescription-textarea:focus{outline-offset:1px;border-color:#2563eb;outline:2px solid #2563eb}.ruleset-inputs{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin-bottom:1rem;display:grid}.choice-fieldset{border:1px solid #d1d5db;border-radius:8px;min-width:0;margin:0;padding:.75rem}.choice-fieldset legend{color:#111827;padding:0 .35rem;font-weight:600}.choice-list{flex-wrap:wrap;gap:.75rem 1.25rem;display:flex}.radio-option,.checkbox-option{align-items:flex-start;gap:.5rem;line-height:1.5;display:inline-flex}.radio-option input,.checkbox-option input{margin-top:.25rem}.checkbox-field{border:1px solid #d1d5db;border-radius:8px;margin:0;padding:.75rem}.field-help{color:#6b7280;margin:.5rem 0 0;font-size:.9rem;line-height:1.6}.input-warning{color:#92400e;background:#fffbeb;border:1px solid #f59e0b;border-radius:8px;margin-bottom:1rem;padding:.75rem 1rem}.prescription-form{margin-top:.5rem}.prescription-textarea{resize:vertical;color:#111827;background:#fff;border:1px solid #d1d5db;border-radius:8px;width:100%;min-height:6.75rem;padding:.85rem;line-height:1.6;display:block}.form-actions{justify-content:flex-end;align-items:center;gap:.75rem;margin-top:.75rem;display:flex}.shortcut-hint{color:#6b7280;font-size:.82rem}.primary-button{color:#fff;background:#1d4ed8;border:0;border-radius:8px;min-width:8rem;min-height:2.75rem;padding:.65rem 1.5rem;font-weight:600}.primary-button:hover:not(:disabled){background:#1e40af}.loading-message,.empty-message{color:#6b7280;margin:0}.error-message{color:#991b1b;overflow-wrap:anywhere;background:#fef2f2;border:1px solid #ef4444;border-radius:8px;margin:0 0 1.5rem;padding:1rem}.result-section{margin-top:1.5rem}.score-card{aspect-ratio:1;background:#fff;border:8px solid;border-radius:50%;flex-direction:column;justify-content:center;align-items:center;width:min(160px,100%);margin:0 auto;display:flex}.score-high{color:#166534;border-color:#15803d}.score-medium{color:#92400e;border-color:#d97706}.score-low{color:#991b1b;border-color:#dc2626}.score-value{font-size:clamp(2.25rem,6vw,3rem);font-weight:700;line-height:1}.score-percent{margin-left:.15rem;font-size:.55em}.score-label{color:#4b5563;margin-top:.6rem;font-size:.9rem}.rule-results h2,.prescription-summary h2{color:#111827;margin:0 0 1rem;font-size:1.25rem}.prescription-summary{min-width:0}.result-overview{border-bottom:1px solid #e5e7eb;grid-template-columns:minmax(180px,.32fr) minmax(0,1fr);align-items:start;gap:1.5rem;padding-bottom:1.25rem;display:grid}.score-overview{justify-content:center;align-items:center;min-height:100%;display:flex}.prescription-item-list{border-top:1px solid #e5e7eb}.prescription-item{overflow-wrap:anywhere;border-bottom:1px solid #e5e7eb;grid-template-columns:minmax(150px,1.35fr) minmax(110px,.75fr) minmax(180px,1.25fr);align-items:center;gap:.75rem;min-width:0;padding:.65rem 0;display:grid}.prescription-item-unknown{background:#fffbeb;padding-left:.6rem;padding-right:.6rem}.prescription-item-heading{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.prescription-item-heading h3{color:#111827;margin:0;font-size:1.05rem}.prn-badge,.unknown-badge,.reference-badge{border-radius:999px;padding:.15rem .45rem;font-size:.8rem;font-weight:600;display:inline-block}.prn-badge{color:#1e40af;background:#dbeafe}.unknown-badge{color:#92400e;background:#fef3c7}.generic-name,.prescription-note{margin:0;line-height:1.5}.generic-name{color:#6b7280;margin-top:.1rem;font-size:.9rem;display:block}.prescription-item-dose{color:#111827;font-weight:600}.empty-value{color:#9ca3af;font-size:.85rem;font-weight:400}.category-list,.reference-list{flex-wrap:wrap;gap:.4rem;margin:0;padding:0;list-style:none;display:flex}.category-list li{color:#374151;background:#e5e7eb;border-radius:6px;padding:.2rem .5rem;font-size:.82rem}.prescription-note{color:#92400e;border-top:1px solid #e5e7eb;grid-column:1/-1;margin-top:-.15rem;padding-top:.55rem;font-size:.9rem}.unknown-warning{color:#92400e;background:#fffbeb;border:1px solid #f59e0b;border-radius:8px;flex-flow:wrap;gap:.25rem .5rem;margin:0 0 .75rem;padding:.55rem .7rem;line-height:1.5;display:flex}.rule-hit-list{flex-direction:column;gap:.4rem;display:flex}.rule-hit{background:#fafafa;border:1px solid #e5e7eb;border-radius:8px;padding:.7rem .85rem}.rule-hit summary{cursor:pointer}.rule-hit summary::marker{color:#6b7280}.rule-hit summary .rule-hit-header{vertical-align:top;width:calc(100% - 1.25rem);margin-left:.25rem;display:inline-flex}.rule-hit-static{padding-left:2.15rem}.rule-hit-content{max-width:75ch;margin-left:1.5rem}.rule-hit-header{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}.rule-hit-header strong{color:#111827;line-height:1.5}.score-delta{color:#374151;font-variant-numeric:tabular-nums;background:#e5e7eb;border-radius:6px;flex:none;padding:.15rem .45rem;font-size:.85rem}.rule-comment{color:#4b5563;margin:.65rem 0 0;line-height:1.65}.rule-results{padding-top:1.25rem}.section-heading{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:.25rem 1rem;margin-bottom:.75rem;display:flex}.section-heading h2{margin-bottom:0}.section-heading p{color:#6b7280;margin:0;font-size:.82rem}.reference-list{margin-top:.75rem}.reference-badge{color:#3730a3;background:#e0e7ff;border-radius:6px}.app-footer{background:#fff;border-top:1px solid #e5e7eb;padding:1.25rem 1.5rem}.app-footer p{color:#6b7280;max-width:1120px;margin:0 auto;font-size:.85rem;line-height:1.6}@media (width<=600px){.app-header{padding:1.5rem 1rem 1.25rem}.app-main{padding:1.25rem 1rem 2rem}.input-card,.result-section{border-radius:10px;padding:1rem}.choice-list{flex-direction:column}.ruleset-inputs,.result-overview{grid-template-columns:1fr}.result-overview{gap:1.25rem}.prescription-item{grid-template-columns:1fr;gap:.35rem}.prescription-item-dose{border-top:1px solid #f3f4f6;padding-top:.35rem}.form-actions{flex-direction:column;justify-content:stretch}.shortcut-hint{display:none}.primary-button{width:100%}}@media (width>=601px) and (width<=800px){.ruleset-inputs{grid-template-columns:1fr}}
