/* assets/css/docs.css — ส่วนเสริมของระบบงานที่ต้องส่ง (ใช้ร่วมกับ kkw.css)
   ใช้ตัวแปรสีของ kkw.css เมื่อมี และมีค่าสำรองเมื่อไม่มี */

.docs-progress {
  height: 10px;
  border-radius: 999px;
  background: var(--line-soft, #e8ebf3);
  overflow: hidden;
}
.docs-progress > span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--ok, #1f9d55);
  transition: width .3s ease;
}

/* รายละเอียดแบบ "หัวข้อ : ค่า" */
.docs-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}
.docs-meta > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: baseline;
}
.docs-meta dt {
  color: var(--muted, #6b7280);
  font-size: 14px;
}
.docs-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .docs-meta > div { grid-template-columns: 1fr; gap: 2px; }
}

/* แถวไฟล์ */
.docs-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft, #e8ebf3);
}
.docs-file .grow {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}
.docs-file .grow:hover { text-decoration: underline; }
.docs-file .grow small {
  color: var(--muted, #6b7280);
  font-weight: 400;
}

.docs-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft, #e8ebf3);
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.docs-link svg { flex: none; }

/* แถวตัวเลขสรุป */
.docs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

/* 2 คอลัมน์บนจอใหญ่ (เนื้อหา + แผงด้านขวา) */
.docs-two {
  display: grid;
  gap: 16px;
  align-items: start;
}
@media (min-width: 960px) {
  .docs-two { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* ตารางติดตาม: คอลัมน์รายการ */
.docs-matrix .docs-col {
  text-align: center;
  white-space: nowrap;
}
.docs-matrix th.docs-col a {
  display: inline-block;
  max-width: 140px;
  white-space: normal;
  color: inherit;
}
.docs-matrix td.docs-col .badge { text-decoration: none; }

/* ตัวเลือกแบบหลายคอลัมน์ (เช่น กลุ่มสาระ) */
.docs-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

/* ---------------- แบบฟอร์มออนไลน์ (form_engine.php) ---------------- */
.fe-form { gap: 18px; }
.fe-heading {
  font-size: 17px;
  font-weight: 700;
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft, #e8ebf3);
}
.fe-form > .fe-heading:first-of-type { border-top: 0; padding-top: 0; }
.fe-info {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--sky-tint, #eef5ff);
  font-size: 14px;
}
.fe-info p { margin: 0; }
.fe-info ul { margin: 6px 0 0; padding-left: 18px; }
.fe-field { margin: 0; border: 0; padding: 0; min-width: 0; }
fieldset.fe-field > legend { padding: 0; margin-bottom: 6px; }
.fe-missing .label,
.fe-missing > legend { color: var(--bad, #c0392b); }
.fe-missing .input,
.fe-missing .select,
.fe-missing .textarea { border-color: var(--bad, #c0392b); }
.fe-missing.fe-choice .fe-pills { outline: 2px solid var(--bad, #c0392b); outline-offset: 4px; border-radius: 10px; }

/* ตัวเลือกแบบปุ่ม (radio / checkbox / มาตรวัด) */
.fe-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.fe-pill { position: relative; cursor: pointer; }
.fe-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fe-pill > span {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line, #d5d9e4);
  border-radius: 10px;
  background: var(--surface, #fff);
  line-height: 1.25;
  text-align: center;
}
.fe-pill-scale > span { min-width: 64px; }
.fe-pill-scale small { font-size: 12px; color: var(--muted, #6b7280); }
.fe-pill input:checked + span {
  border-color: var(--sky, #0b78b8);
  background: var(--sky, #0b78b8);
  color: #fff;
}
.fe-pill input:checked + span small { color: rgba(255, 255, 255, .85); }
.fe-pill input:focus-visible + span { outline: 3px solid var(--sky, #3b82f6); outline-offset: 2px; }
.fe-pill input:disabled + span { cursor: default; opacity: .75; }

.fe-evidence { margin: 0 0 8px; padding-left: 22px; font-size: 14px; color: var(--muted, #555); }
.fe-rubric { margin-top: 6px; }
.fe-suffix { display: flex; align-items: center; gap: 8px; }
.fe-suffix .input { flex: 1; min-width: 0; }
.fe-suffix > span { color: var(--muted, #6b7280); white-space: nowrap; }
.fe-computed {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--line-soft, #eef1f6);
  font-weight: 600;
}
.fe-readonly p { margin: 0; overflow-wrap: anywhere; }
.fe-list { margin: 0; padding-left: 20px; }
.fe-list-inputs { display: grid; gap: 6px; }

/* ช่องที่เรียงเป็นตาราง ('grid' => จำนวนคอลัมน์) — จอโทรศัพท์ไม่เกิน 3 คอลัมน์ */
.fe-grid {
  display: grid;
  grid-template-columns: repeat(var(--fe-cols, 3), minmax(0, 1fr));
  gap: 12px;
  align-items: end; /* ป้ายชื่อยาวไม่เท่ากัน ช่องกรอกยังอยู่แนวเดียวกัน */
}
.fe-grid-2 { --fe-cols: 2; }
.fe-grid-3 { --fe-cols: 3; }
.fe-grid-4 { --fe-cols: 4; }
.fe-grid-5 { --fe-cols: 5; }
.fe-grid-6 { --fe-cols: 6; }
@media (max-width: 640px) {
  .fe-grid-4, .fe-grid-5, .fe-grid-6 { --fe-cols: 3; }
  .fe-grid { gap: 10px 8px; }
}
/* ทุกช่องในตารางถูกซ่อนตามเงื่อนไข: ไม่เว้นที่ว่าง */
.fe-grid:not(:has(> :not([hidden]))) { display: none; }
.fe-grid .field { gap: 4px; }
.fe-grid .opt-text { display: block; font-size: 13px; }
.fe-grid .input { padding: 10px; }
.fe-grid .fe-suffix { gap: 4px; }
.fe-repeat { display: grid; gap: 12px; }
.fe-rows { display: grid; gap: 12px; }
.fe-row { border: 1px solid var(--line-soft, #e8ebf3); }

/* ---------------- เมนูของครู (มี 4 รายการหลังเพิ่ม "งานที่ต้องส่ง") ---------------- */
.bottomnav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.topnav a, .brand-sub { white-space: nowrap; }
/* จอขนาดกลาง: ซ่อนชื่อผู้ใช้ข้างรูป และลดระยะของเมนูให้อยู่ในแถวเดียว */
@media (min-width: 768px) and (max-width: 1180px) {
  .topbar-user .user-chip > span:not(.avatar) { display: none; }
  .topnav a { padding: 0 10px; }
}
/* จอแคบกว่านั้น: เมนูแสดงเฉพาะไอคอน (ชื่อเมนูอยู่ใน title / aria-label) */
@media (min-width: 768px) and (max-width: 960px) {
  .topnav a span { display: none; }
}

/* ---------------- ระบบตรวจการเข้าสอน: สถานะครู กิจกรรมงดเรียน สถานะรายวัน ---------------- */
.tc-side { grid-template-columns: minmax(320px, 1fr) minmax(0, 1.6fr); }
@media (max-width: 1100px) {
  .tc-side { grid-template-columns: 1fr; }
}
.tc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.tc-side .table th, .tc-side .table td { padding: 10px 12px; }
.tc-side .cell-name strong { white-space: nowrap; }
.icon-btn.tc-danger { color: var(--bad-text); }
.icon-btn.tc-danger:hover { background: var(--bad-tint); color: var(--bad-text); }
a.stat { color: inherit; font-weight: inherit; }
a.stat:hover { border-color: #b8c3d6; }
.tc-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tc-list li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.4; }
.tc-list .badge { flex-shrink: 0; }
.tc-banner { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-radius: 14px; background: var(--gold-tint); border: 1px solid #f3dc9b; }

/* สีตามสถานะ: present เข้าสอน · absent ขาดสอน · unknown ไม่ทราบสาเหตุ · leave ลา · late สาย · duty ไปราชการ · activity งดเรียน */
.tc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tc-key { display: inline-flex; align-items: center; gap: 6px; }
.tc-key::before { content: ''; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); background: #fff; }
.tc-key.k-absent::before, .tc-key.k-unknown::before { background: var(--bad-tint); border-color: var(--bad-border); }
.tc-key.k-unknown::before { background: var(--bad); border-color: var(--bad); }
.tc-key.k-leave::before { background: var(--gold-tint); border-color: #f0d27a; }
.tc-key.k-duty::before { background: var(--sky-tint); border-color: #a9d6ef; }
.tc-key.k-activity::before { background: #eef0f5; border-style: dashed; border-color: #b8bfd0; }

.tc-grid { width: 100%; min-width: 880px; border-collapse: separate; border-spacing: 4px; }
.tc-grid thead th { padding: 6px; font-size: 14px; font-weight: 600; color: var(--muted-2); text-align: center; white-space: nowrap; }
.tc-grid tbody th { width: 76px; height: 1px; padding: 0; vertical-align: top; }
.tc-grid td { padding: 0; vertical-align: top; height: 1px; }
.tc-room { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 72px; border-radius: 10px; background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 600; }
.tc-room:hover { background: var(--sky); color: #fff; }
.tc-cell { display: flex; flex-direction: column; gap: 1px; min-height: 72px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 400; line-height: 1.3; }
.tc-cell + .tc-cell { margin-top: 4px; min-height: 0; }
a.tc-cell:hover { border-color: var(--sky); color: var(--ink); }
.tc-cell strong { font-size: 14px; color: var(--navy); }
.tc-cell span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.tc-cell em { font-size: 13px; font-style: normal; font-weight: 600; color: var(--ok-text); }
.tc-cell.tc-empty { border: 1.5px dashed #dfe3ec; background: transparent; }
.tc-cell.k-absent { background: var(--bad-tint); border-color: var(--bad-border); }
.tc-cell.k-absent em { color: var(--bad-text); }
.tc-cell.k-unknown { background: var(--bad); border-color: var(--bad); }
.tc-cell.k-unknown strong, .tc-cell.k-unknown span, .tc-cell.k-unknown em { color: #fff; }
.tc-cell.k-leave, .tc-cell.k-late { background: var(--gold-tint); border-color: #f0d27a; }
.tc-cell.k-leave em, .tc-cell.k-late em { color: var(--gold-text); }
.tc-cell.k-duty { background: var(--sky-tint); border-color: #a9d6ef; }
.tc-cell.k-duty em { color: #0a5a8a; }
.tc-cell.k-activity { background: #f3f4f7; border-style: dashed; border-color: #c5cbd8; }
.tc-cell.k-activity em { color: var(--muted-2); }

/* การ์ดคาบในหน้าตรวจรายห้อง: คาบที่ครูลาหรืองดเรียน แสดงสาเหตุแทนปุ่ม */
.pcard.is-off { background: #fbfcfe; }
.pcard.is-off.k-unknown { border-color: var(--bad-border); }
.tc-off { width: 212px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; text-align: right; }
@media (max-width: 560px) {
  .tc-off { width: 100%; align-items: flex-start; text-align: left; }
}
.tc-sheet { padding: 12px 16px; border-radius: 14px; border: 1.5px dashed #d5dae6; }

/* Tom Select (ค้นหาชื่อครู) ให้เข้ากับช่องกรอกของเว็บ */
.ts-wrapper .ts-control { min-height: 52px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--field); font-family: var(--font-body); font-size: 16px; box-shadow: none; }
.ts-wrapper.focus .ts-control { border-color: var(--sky); box-shadow: 0 0 0 4px var(--sky-tint); }
.ts-wrapper.multi .ts-control > div { padding: 2px 8px; border-radius: 8px; background: var(--sky-tint); color: var(--navy); }
.ts-dropdown { border-radius: 12px; font-family: var(--font-body); font-size: 16px; }

/* ---------------- เครื่องมือเอกสาร (staff/Pdf_Tool.php · assets/js/kkw-pdf.js) ---------------- */
.pt-ico { background: var(--sky-tint); color: var(--sky); }
/* เงินเดือนและภาษี (หน้าหลักครู): สีต่างจากเครื่องมือเอกสาร */
.fin-ico { background: var(--gold-tint); color: var(--gold-text); }
.pt-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 150px;
  padding: 24px 16px;
  border: 2px dashed var(--line, #d5d9e4);
  border-radius: 16px;
  background: var(--surface-2, #f1f3f8);
  color: var(--muted-2, #4d566b);
  text-align: center;
  cursor: pointer;
}
.pt-drop strong { font-size: 17px; color: var(--navy); }
.pt-drop small { font-size: 14px; color: var(--muted); }
.pt-drop:hover, .pt-drop.is-over { border-color: var(--sky); background: var(--sky-tint); }
.pt-drop:focus-within { outline: 3px solid var(--sky); outline-offset: 2px; }
.is-busy .pt-drop, .is-busy .pt-list, .is-busy .pt-thumbs { pointer-events: none; opacity: .65; }

/* รายการไฟล์ */
.pt-list { display: flex; flex-direction: column; border: 1px solid var(--line-soft, #e8ebf3); border-radius: 14px; overflow: hidden; }
.pt-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line-soft, #e8ebf3); }
.pt-item:first-child { border-top: 0; }
.pt-item .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-item .grow strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-item .grow small { font-size: 14px; color: var(--muted); }
.pt-item.is-error .grow small { color: var(--bad-text); }
.pt-item-thumb { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: var(--surface-2); color: var(--muted-2); }
.pt-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-actions { display: flex; gap: 4px; flex-shrink: 0; }
.pt-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line, #d5d9e4);
  border-radius: 10px;
  background: #fff;
  color: var(--muted-2);
  cursor: pointer;
}
.pt-btn:hover { border-color: #b8c3d6; color: var(--navy); }
.pt-btn:disabled { opacity: .35; cursor: default; }
.pt-btn[aria-pressed="true"] { border-color: var(--bad-border); background: var(--bad-tint); color: var(--bad-text); }
@media (max-width: 480px) {
  .pt-item { gap: 8px; padding: 8px 10px; }
  .pt-actions { gap: 2px; }
  .pt-actions .pt-btn { width: 36px; }
}

/* ภาพตัวอย่างหน้า (จัดหน้า) */
.pt-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 480px) {
  .pt-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
.pt-thumb { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--line, #d5d9e4); border-radius: 12px; background: #fff; }
.pt-thumb[draggable="true"] { cursor: grab; }
.pt-thumb.is-dragging { opacity: .4; }
.pt-thumb.is-target { border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-tint); }
.pt-page { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.pt-page canvas { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 1px 3px rgba(27, 37, 89, .18); transition: transform .2s ease; }
.pt-thumb.is-deleted .pt-page { opacity: .3; }
.pt-thumb.is-deleted .pt-num { color: var(--bad-text); text-decoration: line-through; }
.pt-num { font-size: 14px; font-weight: 600; color: var(--navy); }
.pt-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.pt-tools .pt-btn { flex: 1 0 40px; width: auto; }

.pt-result { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--ok-tint); }
.pt-result p { margin: 0; color: var(--ok-text); font-weight: 600; overflow-wrap: anywhere; }
.pt-result .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------------- กระดาษคำตอบปรนัย (staff/Exams.php) ---------------- */
.omr-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
@media (max-width: 560px) {
  .omr-row { flex-wrap: wrap; }
  .omr-row .grow { flex: 1 1 calc(100% - 46px); }
  .omr-actions { width: 100%; padding-left: 46px; }
}
@media (max-width: 560px) {
  .omr-actions { flex-wrap: wrap; padding-left: 0; gap: 6px; }
  .omr-actions .btn-sm { padding: 0 10px; }
}
.omr-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 560px) {
  .omr-head-actions .btn { flex: 1 1 calc(50% - 5px); padding: 0 12px; }
}

/* เฉลย (Exam_Key.php) และแถวที่ต้องตรวจ (Exam_Scan.php): ข้อละ 1 แถว ไหลลงทีละคอลัมน์เหมือนกระดาษ */
.omr-key { columns: 300px; column-gap: 32px; }
.omr-key-row { display: flex; align-items: center; gap: 6px; margin: 0; padding: 5px 0; border: 0; break-inside: avoid; }
.omr-key-num { flex: 0 0 30px; font-weight: 700; color: var(--navy); text-align: right; font-variant-numeric: tabular-nums; }
.omr-choice { position: relative; cursor: pointer; }
.omr-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.omr-choice > span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 4px;
  border: 1.5px solid var(--field); border-radius: 999px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 600;
  transition: background-color .12s, border-color .12s, color .12s;
}
.omr-choice:hover > span { border-color: #aeb6c9; }
.omr-choice input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.omr-choice input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.omr-choice-x > span { min-width: 56px; padding: 0 8px; border-radius: 10px; font-size: 14px; color: var(--muted-2); }
.omr-choice-x input:checked + span { border-color: var(--gold-strong); background: var(--gold-tint); color: var(--gold-text); }
@media (max-width: 480px) {
  .omr-key-row { gap: 4px; }
  .omr-key-num { flex-basis: 26px; }
  .omr-choice > span { min-width: 38px; height: 38px; }
  .omr-choice-x > span { min-width: 50px; padding: 0 6px; }
}

/* สแกน */
.omr-view { position: relative; overflow: hidden; border-radius: 14px; background: #111; }
.omr-view video, .omr-view canvas { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.omr-view canvas { position: absolute; inset: 0; height: 100%; }
.omr-hint {
  position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; padding: 8px 12px; border-radius: 10px;
  background: rgba(17, 24, 39, .72); color: #fff; font-size: 15px; font-weight: 600; text-align: center;
}
.omr-hint:empty { display: none; }
.omr-cam-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.omr-cam-actions .btn { flex: 1 1 200px; }
.omr-status { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted-2); font-weight: 600; }
.omr-status.is-ok { background: var(--ok-tint); color: var(--ok-text); }
.omr-status.is-warn { background: var(--gold-tint); color: var(--gold-text); }
.omr-status.is-bad { background: var(--bad-tint); color: var(--bad-text); }
.omr-score { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.omr-score p { margin: 0; overflow-wrap: anywhere; }
.omr-score-value { font-family: var(--font-head); font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
.omr-score-value small { font-size: 20px; font-weight: 600; color: var(--muted); }
.omr-review { columns: auto; padding: 6px 12px; border: 1.5px solid #f6c66f; border-radius: 12px; background: #fffaf0; }
.omr-review-row { flex-wrap: wrap; }
.omr-review-why { flex: 1 1 auto; padding-left: 4px; color: var(--gold-text); }
@media (max-width: 480px) {
  .omr-review { padding: 4px 6px; }
  .omr-review .omr-choice-x > span { min-width: 44px; }
}
.omr-preview { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.omr-log { margin: 0; padding: 0; list-style: none; }
.omr-log li { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line-soft); }
.omr-log li:first-child { border-top: none; }
.omr-log strong { font-variant-numeric: tabular-nums; color: var(--navy); }

/* คะแนน (Exam_Results.php) */
.omr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) {
  .omr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.omr-score-row { align-items: center; }
.omr-score-row .grow:hover { text-decoration: none; }
.omr-sid { flex: 0 0 auto; min-width: 64px; font-size: 17px; color: var(--navy); font-variant-numeric: tabular-nums; }
.omr-points { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.omr-items { display: flex; flex-direction: column; }
.omr-item {
  display: grid; grid-template-columns: 30px 52px minmax(60px, 1fr) 46px; grid-template-areas: 'num key bar pct' '. dist dist dist';
  align-items: center; column-gap: 10px; row-gap: 2px; padding: 8px 20px; border-top: 1px solid var(--line-soft);
}
.omr-item:first-child { border-top: none; }
.omr-item-num { grid-area: num; font-weight: 700; color: var(--navy); text-align: right; font-variant-numeric: tabular-nums; }
.omr-item-key { grid-area: key; justify-self: start; padding: 1px 8px; border-radius: 999px; background: var(--ok-tint); color: var(--ok-text); font-size: 14px; font-weight: 700; }
.omr-item-bar { grid-area: bar; height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.omr-item-bar span { display: block; height: 100%; border-radius: 999px; background: var(--sky); }
.omr-item.is-hard .omr-item-bar span { background: var(--bad); }
.omr-item-pct { grid-area: pct; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy); }
.omr-item-dist { grid-area: dist; display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); font-size: 13px; }
.omr-item-dist .is-key { color: var(--ok-text); font-weight: 700; }
@media (max-width: 480px) {
  .omr-item { grid-template-columns: 26px 48px minmax(40px, 1fr) 42px; column-gap: 8px; padding: 8px 16px; }
}
