/* Đánh giá trẻ */
#view-danh-gia .ev-drop { border: 2px dashed var(--line); border-radius: 16px; padding: 40px 20px; text-align: center; background: var(--panel); }
#view-danh-gia .ev-drop h2 { font-size: 19px; margin-bottom: 6px; }
#view-danh-gia .ev-drop p { color: var(--muted); margin: 0 auto 16px; max-width: 560px; }
#view-danh-gia .ev-drop code, #view-danh-gia .hint code { background: var(--panel-2); padding: 0 4px; border-radius: 4px; }
#view-danh-gia .ev-tpl { display: flex; gap: 10px; align-items: center; }
#view-danh-gia .ev-tpl b { display: block; word-break: break-word; }
#view-danh-gia .ev-kids { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 320px; overflow: auto; }
#view-danh-gia .ev-kid { display: flex; justify-content: space-between; gap: 8px; text-align: left; padding: 7px 10px; }
#view-danh-gia .ev-kid.active { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
#view-danh-gia .ev-kid small { color: var(--muted); font-weight: 400; white-space: nowrap; }
#view-danh-gia .ev-kid small.done { color: var(--ok); }
#view-danh-gia .ev-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
#view-danh-gia .ev-head h2 { font-size: 18px; }
#view-danh-gia .ev-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; flex: 1; min-width: 80px; max-width: 220px; }
#view-danh-gia .ev-bar div { height: 100%; background: var(--ok); }
#view-danh-gia .ev-sec { margin-top: 16px; }
#view-danh-gia .ev-sec > h3 { font-size: 14px; padding: 8px 12px; border-radius: 8px; background: var(--accent); color: #fff; }
#view-danh-gia .ev-group { font-size: 13px; font-weight: 600; color: var(--accent); margin: 12px 2px 6px; }
#view-danh-gia .ev-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-top: 6px; }
#view-danh-gia .ev-row.done { border-left: 4px solid var(--ok); }
#view-danh-gia .ev-code { font-weight: 700; margin-right: 6px; }
#view-danh-gia .ev-obj { font-size: 14px; }
#view-danh-gia .ev-ind { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
#view-danh-gia .ev-ind summary { cursor: pointer; width: max-content; }
#view-danh-gia .ev-ind div { white-space: pre-line; margin-top: 4px; }
#view-danh-gia .ev-levels { display: flex; gap: 4px; align-self: start; }
#view-danh-gia .ev-levels button { min-width: 44px; padding: 6px 8px; font-weight: 600; }
#view-danh-gia .ev-levels button.active { color: #fff; border-color: var(--lv); background: var(--lv); }
#view-danh-gia .ev-note { grid-column: 1 / -1; }
#view-danh-gia .ev-note input { padding: 5px 8px; font-size: 13px; }
#view-danh-gia .ev-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
#view-danh-gia .ev-quick button { padding: 4px 10px; }
/* Ready-made templates */
#view-danh-gia .ev-samples { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
#view-danh-gia .ev-samples.big { max-width: 520px; margin: 8px auto 0; text-align: left; }
#view-danh-gia .ev-sample { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); transition: border-color .15s; }
#view-danh-gia .ev-sample:hover { border-color: var(--accent); }
#view-danh-gia .ev-sample > div { flex: 1; min-width: 0; }
#view-danh-gia .ev-sample b { display: block; font-size: 13px; }
#view-danh-gia .ev-sample small { display: block; font-size: 12px; color: var(--muted); }
#view-danh-gia .ev-sample button { padding: 4px 10px; font-size: 13px; white-space: nowrap; }
#view-danh-gia .ev-or { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
/* Keyboard: current row, sticky child header, hints */
#view-danh-gia .ev-row { scroll-margin-top: calc(var(--ev-top, 0px) + 72px); scroll-margin-bottom: 24px; }
#view-danh-gia .ev-row.cursor { outline: 2px solid var(--accent); outline-offset: 1px; box-shadow: 0 2px 10px rgba(37, 99, 235, .15); }
#view-danh-gia main { scroll-margin-top: var(--ev-top, 0px); }
@media (min-width: 701px) {
  #view-danh-gia .ev-head { position: sticky; top: var(--ev-top, 0px); z-index: 3; background: var(--bg); padding: 8px 0; margin-top: -8px; border-bottom: 1px solid var(--line); }
}
#view-danh-gia kbd, .ev-keys kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--panel); font: 600 11px/18px system-ui, sans-serif; text-align: center; color: var(--text); margin: 0 1px; }
#view-danh-gia .ev-keyhint { margin-top: 8px; font-size: 12px; color: var(--muted); }
#view-danh-gia .linklike { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: 12px; }
#view-danh-gia .linklike:hover { text-decoration: underline; }
@media (hover: none), (pointer: coarse) { #view-danh-gia .ev-keyhint { display: none; } }
#view-danh-gia .ev-kid-filter { margin-top: 10px; width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); font: inherit; }
.ev-keys-box { background: var(--panel); color: var(--text); border-radius: 14px; padding: 20px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; }
.ev-keys-box h3 { margin-bottom: 10px; }
.ev-keys-box table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.ev-keys-box td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ev-keys-box td:first-child { white-space: nowrap; padding-right: 14px; }
#view-danh-gia .ev-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
#view-danh-gia .ev-notes textarea, #view-danh-gia .ev-log textarea { width: 100%; resize: vertical; font: inherit; }
#view-danh-gia .ev-log { display: grid; gap: 6px; margin-top: 8px; }
#view-danh-gia .ev-log-row { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)) 32px; gap: 6px; align-items: start; }
#view-danh-gia .ev-log-head { font-size: 12px; font-weight: 600; color: var(--muted); }
@media (max-width: 700px) {
  #view-danh-gia .ev-log-row { grid-template-columns: 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line, #e5e7eb); }
  #view-danh-gia .ev-log-head { display: none; }
}
#view-danh-gia .ev-fill { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
#view-danh-gia .ev-fill b { font-weight: 600; margin-right: 2px; }
#view-danh-gia .ev-legend { display: flex; gap: 6px; flex-wrap: wrap; }
#view-danh-gia .ev-legend span { font-size: 12px; padding: 2px 8px; border-radius: 99px; color: #fff; background: var(--lv); }
#view-danh-gia .ev-scope { display: flex; flex-wrap: wrap; gap: 4px 12px; }
@media (max-width: 640px) {
  #view-danh-gia .ev-row { grid-template-columns: 1fr; }
  #view-danh-gia .ev-levels button { flex: 1; min-width: 0; padding: 9px 4px; }
  #view-danh-gia .ev-note input { font-size: 16px; }
}
/* Just-rated row: a short pop on the chosen level so the tap feels answered. */
#view-danh-gia .ev-row.just .ev-levels button.active { animation: pop .28s ease-out; }
#view-danh-gia .ev-row.just { animation: flash .6s ease-out; }
@keyframes flash { from { background: var(--ok-bg); } }
#view-danh-gia .ev-kid { transition: background .15s, border-color .15s; }
