.ha-card { padding: 28px; }
.ha-title-bar { background: linear-gradient(135deg, var(--site-dark, #0f766e) 0%, var(--site-dark-2, #115e59) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.ha-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; }

.ha-label { display: block; font-weight: 600; font-size: .9em; color: #374151; margin-bottom: 8px; }
.ha-input { display: block; width: 100%; max-width: 100%; box-sizing: border-box; border: 1px solid #d1d5db; border-radius: 10px; padding: 13px 14px; font: inherit; font-size: 1.05em; color: #23272f; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.ha-input:focus { border-color: var(--site-light, #14b8a6); box-shadow: 0 0 0 3px rgba(20, 184, 166, .18); }
.ha-input-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: .82em; color: #6b7280; }

.ha-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin: 14px 0 20px; }
.ha-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #d1d5db; background: #f3f4f6; color: #374151; border-radius: 30px; padding: 8px 18px; font-weight: 600; font-size: .9em; cursor: pointer; transition: background .2s ease; }
.ha-btn:hover { background: #e5e7eb; }
.ha-btn-primary { background: var(--site-dark, #0f766e); border-color: var(--site-dark, #0f766e); color: #fff; }
.ha-btn-primary:hover { background: var(--site-dark-2, #115e59); }
.ha-btn:focus-visible, .ha-input:focus-visible { outline: 3px solid rgba(20, 184, 166, .5); outline-offset: 2px; }

.ha-empty { text-align: center; color: #6b7280; font-size: .95em; padding: 22px 12px; background: #f7f8fa; border: 1px dashed #d1d5db; border-radius: 10px; }
.ha-empty[hidden], .ha-results[hidden], .ha-tips-wrap[hidden] { display: none; }

.ha-summary { display: grid; grid-template-columns: 1fr 1.5fr; gap: 14px; align-items: stretch; }
.ha-score-box { border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; background: #fff; text-align: center; }
.ha-score-label { font-size: .85em; font-weight: 700; color: #374151; }
.ha-score-num { display: block; font-size: 2.6em; font-weight: 800; color: #23272f; line-height: 1.1; margin: 6px 0; }
.ha-score-num small { font-size: .4em; color: #6b7280; font-weight: 600; }
.ha-band { display: inline-block; font-weight: 700; font-size: .9em; border-radius: 30px; padding: 5px 14px; color: #fff; background: #15803d; }
.ha-band-mid { background: #b45309; }
.ha-band-low { background: #b91c1c; }
.ha-facts { border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; background: #f7f8fa; }
.ha-facts-row { display: flex; justify-content: space-between; gap: 10px; font-size: .92em; color: #374151; padding: 6px 0; border-bottom: 1px solid #e5e7eb; }
.ha-facts-row:last-of-type { border-bottom: 0; }
.ha-facts-row strong { color: #23272f; }
.ha-band-note { font-size: .88em; color: #374151; line-height: 1.5; margin: 12px 0 0; }

.ha-group-title { font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; margin: 20px 0 10px; font-weight: 700; }

.ha-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ha-rule { border: 1px solid #eee; border-left: 4px solid #d1d5db; border-radius: 8px; padding: 10px 14px; background: #fff; }
.ha-rule-pass { border-left-color: #15803d; }
.ha-rule-partial { border-left-color: #b45309; }
.ha-rule-miss { border-left-color: #9ca3af; }
.ha-rule-penalty { border-left-color: #b91c1c; background: #fef2f2; }
.ha-rule-clear { border-left-color: #15803d; }
.ha-rule-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ha-rule-name { font-weight: 700; font-size: .93em; color: #23272f; }
.ha-rule-pts { font-weight: 700; font-size: .9em; color: #23272f; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ha-rule-detail { font-size: .85em; color: #4b5563; margin-top: 4px; line-height: 1.5; overflow-wrap: anywhere; }

.ha-tips { margin: 0; padding-left: 20px; color: #374151; font-size: .92em; line-height: 1.6; }
.ha-tips li { margin-bottom: 6px; }

@media (max-width: 600px) {
    .ha-card { padding: 20px 16px; }
    .ha-title-bar { margin: -20px -16px 20px; padding: 14px 16px; }
    .ha-summary { grid-template-columns: 1fr; }
    .ha-actions { justify-content: stretch; }
    .ha-btn { flex: 1 1 100%; justify-content: center; }
    .ha-score-num { font-size: 2.2em; }
}
