/* =====================================================================
   마이페이지 · 학습 기록 탭 (#my-records) + 기록 상세 창 (#mrDetail)
   ---------------------------------------------------------------------
   [2026-10-07] 다시 정리했다.
     · 조회 조건(기간·제목 검색·정렬·종류·기준 이상만)을 표 위 한 장에 모았다.
     · 표는 상자 폭에 맞춘다(table-layout:fixed) — 넓은 화면에서 가로로 밀지 않는다.
       상자가 좁아지면 표 대신 카드로 선다(@container). 그래서 가로 막대가 생길
       일이 없다(예전 '막대가 떨리는' 문제도 생길 자리가 없다).
     · 정확도·속도·학습시간·오류 숫자는 오른쪽 맞춤 + 같은 폭 숫자(tabular-nums).
     · 글자는 예전 학습 기록 표보다 작아지지 않게 잡았다(본문·숫자 15px 이상,
       시각·딱지·머리글 같은 보조 글 14px 이상). 사장님이 작은 글자를 싫어하신다.
     · 색은 마이페이지 다른 탭과 같은 보라(#6C5CE7). 초록·주황·빨강은 정확도
       판정에만, 옅은 바탕으로만 쓴다.
     · 글씨체는 사이트 공통(font-system.css)을 그대로 쓴다. 여기서 정하지 않는다.
   그리는 곳: assets/js/learning-portal.js 의 renderRecordTable() · openRecordDetail()
   ===================================================================== */

#my-records,
#mrDetail{
  --mr-accent:#6C5CE7;
  --mr-accent-deep:#5A4BD4;
  --mr-accent-soft:#F0EDFF;
  --mr-accent-wash:#F8F7FF;
  --mr-accent-line:#D5D0FF;
  --mr-ink:#111827;
  --mr-body:#374151;
  --mr-muted:#667085;
  --mr-faint:#8A94A6;
  --mr-zero:#C2C8D2;
  --mr-line:#ECECF3;
  --mr-line-soft:#F1F2F6;
  --mr-head:#F9FAFB;
  --mr-good:#047857;
  --mr-good-bg:#ECFDF5;
  --mr-near:#9A5B06;
  --mr-near-bg:#FFF8E6;
  --mr-low:#BE123C;
  --mr-low-bg:#FFF1F2;
  --mr-ease:cubic-bezier(0.4,0,0.2,1);
  word-break:keep-all;
}
#my-records.active{display:block!important;}
#my-records .mr-host{min-width:0;}
#my-records .mr-loading{margin:0;padding:28px 24px;color:var(--mr-muted);font-size:16px;}
#my-records [hidden],
#mrDetail [hidden]{display:none!important;}
#my-records .mr-sr,
#mrDetail .mr-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}

/* 표 상자가 받은 폭으로 표/카드를 가른다 */
#my-records .mr{container:mr / inline-size;display:grid;gap:16px;min-width:0;}

/* ── 카드 공통 ─────────────────────────────────────────────────────── */
#my-records .mr-card{
  position:relative;
  min-width:0;
  margin:0;
  background:#fff;
  border:1px solid var(--mr-line);
  border-radius:18px;
  box-shadow:none;
}

/* ── 버튼 공통 ─────────────────────────────────────────────────────── */
#my-records .mr-btn,
#mrDetail .mr-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:46px;
  padding:0 20px;
  border:1px solid var(--mr-accent);
  border-radius:14px;
  background:var(--mr-accent);
  color:#fff;
  font-size:16px;
  font-weight:700;
  line-height:1.2;
  text-decoration:none;
  cursor:pointer;
  transition:background-color .15s var(--mr-ease),border-color .15s var(--mr-ease),color .15s var(--mr-ease),transform .15s var(--mr-ease);
}
#my-records .mr-btn:hover,
#mrDetail .mr-btn:hover{background:var(--mr-accent-deep);border-color:var(--mr-accent-deep);color:#fff;}
#my-records .mr-btn-line,
#mrDetail .mr-btn-line{background:#fff;border-color:#E5E7EB;color:var(--mr-body);}
#my-records .mr-btn-line:hover,
#mrDetail .mr-btn-line:hover{background:var(--mr-accent-wash);border-color:var(--mr-accent-line);color:var(--mr-accent-deep);}
#my-records .mr-btn:disabled{opacity:.6;cursor:default;}
#my-records :is(button,a,input,select,summary,tr):focus-visible,
#mrDetail :is(button,a):focus-visible{outline:2px solid var(--mr-accent);outline-offset:2px;}

/* ── 조회 조건 ─────────────────────────────────────────────────────── */
#my-records .mr-filters-box{margin:0;}
#my-records .mr-filters-sum{
  display:flex;
  align-items:baseline;
  gap:10px;
  padding:18px 24px;
  list-style:none;
  cursor:pointer;
  border-radius:18px;
}
#my-records .mr-filters-sum::-webkit-details-marker{display:none;}
#my-records .mr-filters-sum::after{
  content:"";
  width:9px;height:9px;
  margin-left:auto;
  align-self:center;
  border-right:2px solid var(--mr-faint);
  border-bottom:2px solid var(--mr-faint);
  transform:rotate(45deg) translateY(-3px);
  transition:transform .15s var(--mr-ease);
}
#my-records .mr-filters-box[open] > .mr-filters-sum::after{transform:rotate(-135deg) translateY(-2px);}
#my-records .mr-filters-box[open] > .mr-filters-sum{padding-bottom:6px;}
#my-records .mr-filters-title{color:var(--mr-ink);font-size:17px;font-weight:700;line-height:1.3;}
#my-records .mr-filters-state{min-width:0;color:var(--mr-muted);font-size:15px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#my-records .mr-filters-box[open] .mr-filters-state{display:none;}
#my-records .mr-filters-body{display:grid;gap:18px;padding:12px 24px 22px;}
#my-records .mr-reset{
  position:absolute;
  top:14px;
  right:56px;
  min-height:36px;
  padding:0 12px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--mr-accent-deep);
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:background-color .15s var(--mr-ease);
}
#my-records .mr-reset:hover{background:var(--mr-accent-soft);}

#my-records .mr-filters-row{
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 190px;
  gap:16px;
}
#my-records .mr-field{display:grid;gap:8px;min-width:0;}
#my-records .mr-label{display:flex;align-items:baseline;gap:8px;color:var(--mr-body);font-size:15px;font-weight:600;line-height:1.3;}
#my-records .mr-hint{color:var(--mr-faint);font-size:14px;font-weight:400;}
#my-records .mr-input{
  box-sizing:border-box;
  width:100%;
  min-width:0;
  height:46px;
  margin:0;
  padding:0 13px;
  border:1px solid #E5E7EB;
  border-radius:10px;
  background:#fff;
  color:var(--mr-ink);
  font-size:16px;
  font-weight:500;
  line-height:1.2;
  transition:border-color .15s var(--mr-ease);
}
#my-records .mr-input::placeholder{color:var(--mr-faint);font-weight:400;}
#my-records .mr-input:hover{border-color:#D1D5DB;}
#my-records .mr-input:focus{border-color:var(--mr-accent);}
#my-records select.mr-input{padding-right:32px;cursor:pointer;}
#my-records .mr-range{display:flex;align-items:center;gap:8px;min-width:0;}
#my-records .mr-range > span{color:var(--mr-faint);font-size:16px;}
#my-records .mr-range .mr-input{flex:1 1 0;}
#my-records .mr-search{position:relative;min-width:0;}
#my-records .mr-search svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--mr-faint);pointer-events:none;}
#my-records .mr-search .mr-input{padding-left:40px;}

#my-records .mr-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
#my-records .mr-chip{
  min-height:40px;
  padding:0 16px;
  border:1px solid #E5E7EB;
  border-radius:9999px;
  background:#fff;
  color:var(--mr-body);
  font-size:16px;
  font-weight:500;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  transition:background-color .15s var(--mr-ease),border-color .15s var(--mr-ease),color .15s var(--mr-ease);
}
#my-records .mr-chip:hover{border-color:var(--mr-accent-line);color:var(--mr-accent-deep);}
#my-records .mr-chip.on{background:var(--mr-accent);border-color:var(--mr-accent);color:#fff;font-weight:700;}
#my-records .mr-chip-quiet.on{background:var(--mr-accent-soft);border-color:var(--mr-accent-line);color:var(--mr-accent-deep);}
#my-records .mr-chip-sep{width:1px;height:24px;margin:0 4px;background:#E5E7EB;}

/* ── 목록 머리 ─────────────────────────────────────────────────────── */
#my-records .mr-list{overflow:visible;}
#my-records .mr-list-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px 16px;
  padding:18px 22px;
  border-bottom:1px solid var(--mr-line-soft);
}
#my-records .mr-sum{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;min-width:0;margin:0;}
#my-records .mr-sum b{color:var(--mr-ink);font-size:20px;font-weight:800;line-height:1.3;font-variant-numeric:tabular-nums;}
#my-records .mr-cond{color:var(--mr-muted);font-size:15px;line-height:1.45;font-variant-numeric:tabular-nums;}
#my-records .mr-tools{display:flex;align-items:center;gap:10px;flex:0 0 auto;}
#my-records .mr-tools .mr-size{flex:0 0 auto;width:auto!important;min-width:112px;height:42px;}

/* 정확도 기준 풍선 */
#my-records .mr-tip{position:relative;display:inline-flex;}
#my-records .mr-tip-btn{
  display:inline-grid;
  place-items:center;
  width:40px;height:40px;
  padding:0;
  border:1px solid #E5E7EB;
  border-radius:9999px;
  background:#fff;
  color:var(--mr-muted);
  cursor:help;
  transition:border-color .15s var(--mr-ease),color .15s var(--mr-ease);
}
#my-records .mr-tip-btn:hover{border-color:var(--mr-accent-line);color:var(--mr-accent-deep);}
#my-records .mr-tip-pop{
  position:absolute;
  right:-8px;
  top:calc(100% + 12px);
  z-index:30;
  display:grid;
  gap:8px;
  box-sizing:border-box;
  width:340px;
  max-width:calc(100vw - 32px);
  padding:16px 18px;
  border-radius:14px;
  background:#1F2937;
  color:#fff;
  font-size:15px;
  line-height:1.55;
  text-align:left;
  box-shadow:0 20px 25px -5px rgba(0,0,0,.12);
  opacity:0;
  visibility:hidden;
  transform:translateY(-4px);
  transition:opacity .15s var(--mr-ease),transform .15s var(--mr-ease),visibility .15s;
  pointer-events:none;
}
#my-records .mr-tip-pop::after{
  content:"";
  position:absolute;
  right:22px;
  top:-5px;
  width:10px;height:10px;
  background:#1F2937;
  transform:rotate(45deg);
}
#my-records .mr-tip:hover .mr-tip-pop,
#my-records .mr-tip:focus-within .mr-tip-pop{opacity:1;visibility:visible;transform:none;}
#my-records .mr-tip-title{font-size:16px;font-weight:700;}
#my-records .mr-tip-body,
#my-records .mr-tip-foot{color:#D1D5DB;}
#my-records .mr-tip-list{display:grid;gap:4px;margin:2px 0;padding:10px 0;border-top:1px solid rgba(255,255,255,.14);border-bottom:1px solid rgba(255,255,255,.14);list-style:none;}
#my-records .mr-tip-list li{display:flex;justify-content:space-between;gap:12px;}
#my-records .mr-tip-list b{font-weight:700;font-variant-numeric:tabular-nums;}
#my-records .mr-tip-none b{color:#D1D5DB;font-weight:500;}

/* ── 표 ────────────────────────────────────────────────────────────── */
#my-records .mr-table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  border-spacing:0;
  margin:0;
  background:transparent;
}
/* 고정 칸 합 656px — 나머지가 모두 제목 칸이다. 아래 '카드로 서는 폭'(859px)과 맞물린다. */
#my-records .mr-col-date{width:136px;}
#my-records .mr-col-acc{width:136px;}
#my-records .mr-col-speed{width:120px;}
#my-records .mr-col-dur{width:100px;}
#my-records .mr-col-err{width:84px;}
#my-records .mr-col-more{width:80px;}
#my-records .mr-table th{
  padding:12px 14px;
  border-bottom:1px solid #E5E7EB;
  background:var(--mr-head);
  color:var(--mr-muted);
  font-size:15px;
  font-weight:600;
  line-height:1.3;
  text-align:left;
  white-space:nowrap;
}
#my-records .mr-table td{
  padding:14px;
  border-bottom:1px solid var(--mr-line-soft);
  color:var(--mr-body);
  font-size:16px;
  line-height:1.4;
  vertical-align:top;
  background:transparent;
}
#my-records .mr-table tbody tr:last-child td{border-bottom:0;}
#my-records .mr-table :is(th,td):is(.c-acc,.c-speed,.c-dur,.c-err,.c-more){text-align:right;}
#my-records .mr-row{cursor:pointer;transition:background-color .15s var(--mr-ease);}
#my-records .mr-row:hover{background:var(--mr-accent-wash);}
#my-records .mr-row:active{background:var(--mr-accent-soft);}
#my-records .mr-row:focus-visible{outline:2px solid var(--mr-accent);outline-offset:-2px;}

#my-records .mr-table td b{display:block;color:var(--mr-ink);font-weight:700;font-variant-numeric:tabular-nums;}
#my-records .mr-sub{display:block;margin-top:3px;color:var(--mr-muted);font-size:14px;font-weight:400;line-height:1.35;font-variant-numeric:tabular-nums;}
#my-records .mr-table .c-date b{font-size:16px;font-weight:600;}
#my-records .mr-table td.c-more{padding-left:4px;padding-right:12px;}
#my-records .c-date .mr-sub{font-size:15.6px;}
#my-records .c-title{min-width:0;}
#my-records .mr-kind,
#mrDetail .mr-kind{
  display:inline-block;
  max-width:100%;
  padding:2px 8px;
  border-radius:6px;
  background:var(--mr-accent-soft);
  color:var(--mr-accent-deep);
  font-size:15.6px;
  font-weight:700;
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  vertical-align:top;
}
#my-records .c-title .mr-kind{margin-bottom:5px;}
#my-records .mr-ttl{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  color:var(--mr-ink);
  font-size:17.6px;
  font-weight:600;
  line-height:1.45;
  overflow-wrap:anywhere;
}
#my-records .c-speed b,
#my-records .c-dur b,
#my-records .c-err b{font-size:18px;line-height:1.35;}
#my-records .c-speed b em,
#my-records .mr-mstat b i{margin-left:2px;color:var(--mr-muted);font-size:14px;font-style:normal;font-weight:500;}
#my-records .is-zero,
#mrDetail .is-zero{color:var(--mr-zero)!important;}
#my-records .mr-none,
#mrDetail .mr-none{color:var(--mr-zero);font-size:18px;font-weight:600;}
#my-records .mr-more{
  min-height:36px;
  padding:0 12px;
  border:1px solid #E5E7EB;
  border-radius:8px;
  background:#fff;
  color:var(--mr-body);
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:border-color .15s var(--mr-ease),color .15s var(--mr-ease);
}
#my-records .mr-row:hover .mr-more{border-color:var(--mr-accent-line);color:var(--mr-accent-deep);}

/* 정확도 딱지 — 바탕은 옅게, 판정은 글자색으로 읽힌다 */
#my-records .mr-acc,
#mrDetail .mr-acc{
  display:inline-flex;
  align-items:baseline;
  justify-content:flex-end;
  gap:1px;
  padding:5px 10px;
  border-radius:8px;
  background:#F3F4F6;
  color:var(--mr-ink);
  font-size:18.5px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
#my-records .mr-acc small,
#mrDetail .mr-acc small{font-size:14px;font-weight:600;}
#my-records .mr-acc-good,
#mrDetail .mr-acc-good{background:var(--mr-good-bg);color:var(--mr-good);}
#my-records .mr-acc-near,
#mrDetail .mr-acc-near{background:var(--mr-near-bg);color:var(--mr-near);}
#my-records .mr-acc-low,
#mrDetail .mr-acc-low{background:var(--mr-low-bg);color:var(--mr-low);}
#my-records .mr-acc-plain,
#mrDetail .mr-acc-plain{background:#F3F4F6;color:var(--mr-ink);}
#my-records .mr-acc-none,
#mrDetail .mr-acc-none{background:#F3F4F6;color:var(--mr-muted);font-size:15px;font-weight:600;}
#my-records .mr-acc-subj,
#mrDetail .mr-acc-subj{margin-right:5px;font-size:14px;font-style:normal;font-weight:600;}
#my-records .mr-acc-multi{display:inline-grid;gap:5px;justify-items:end;}

/* ── 휴대폰 카드 (표 상자가 좁을 때) ───────────────────────────────── */
#my-records .mr-cards{display:none;margin:0;padding:14px;list-style:none;gap:12px;}
#my-records .mr-mcard{
  display:grid;
  gap:8px;
  box-sizing:border-box;
  width:100%;
  margin:0;
  padding:15px 16px;
  border:1px solid #E5E7EB;
  border-radius:18px;
  background:#fff;
  color:var(--mr-body);
  font:inherit;
  text-align:left;
  cursor:pointer;
  transition:border-color .15s var(--mr-ease),transform .15s var(--mr-ease);
}
#my-records .mr-mcard:hover{border-color:var(--mr-accent-line);}
#my-records .mr-mcard-top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;}
#my-records .mr-mcard-date{flex:0 0 auto;color:var(--mr-muted);font-size:15px;font-variant-numeric:tabular-nums;}
#my-records .mr-mcard-title{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  color:var(--mr-ink);
  font-size:17px;
  font-weight:600;
  line-height:1.45;
  overflow-wrap:anywhere;
}
#my-records .mr-mcard-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:4px;
  padding-top:12px;
  border-top:1px solid var(--mr-line-soft);
}
#my-records .mr-mstat{display:grid;align-content:start;gap:4px;min-width:0;}
#my-records .mr-mstat em{color:var(--mr-muted);font-size:14px;font-style:normal;font-weight:500;}
#my-records .mr-mstat b{color:var(--mr-ink);font-size:17px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums;white-space:nowrap;}
#my-records .mr-mstat .mr-acc{justify-self:start;padding:3px 8px;font-size:17px;}
#my-records .mr-mstat .mr-acc-none{font-size:15px;}
#my-records .mr-mstat .mr-acc-multi{justify-items:start;}

/* ── 쪽 넘기기 (표 바로 아래) ──────────────────────────────────────── */
#my-records .mr-list-foot:empty{display:none;}
#my-records .mr-list-foot{padding:16px 22px 20px;border-top:1px solid var(--mr-line-soft);}
#my-records .mr-pager{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;}
#my-records .mr-pager button{
  min-width:40px;
  min-height:40px;
  padding:0 10px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--mr-body);
  font-size:16px;
  font-weight:500;
  font-variant-numeric:tabular-nums;
  cursor:pointer;
  transition:background-color .15s var(--mr-ease),color .15s var(--mr-ease);
}
#my-records .mr-pager button:hover:not(:disabled){background:var(--mr-head);color:var(--mr-accent-deep);}
#my-records .mr-pager .mr-pager-num.on{background:var(--mr-accent);color:#fff;font-weight:700;}
#my-records .mr-pager .mr-pager-side{padding:0 14px;font-weight:600;}
#my-records .mr-pager button:disabled{color:#C2C8D2;cursor:default;}
#my-records .mr-pager-gap{min-width:24px;color:var(--mr-faint);font-size:16px;text-align:center;}

/* ── 빈 상태 · 불러오기 실패 ───────────────────────────────────────── */
#my-records .mr-empty,
#my-records .mr-state{display:grid;justify-items:center;gap:8px;padding:52px 24px 56px;text-align:center;}
#my-records .mr-state-ico{display:grid;place-items:center;width:56px;height:56px;margin-bottom:6px;border-radius:9999px;background:var(--mr-accent-soft);color:var(--mr-accent);}
#my-records .mr-empty b,
#my-records .mr-state b{color:var(--mr-ink);font-size:18px;font-weight:700;}
#my-records .mr-empty p,
#my-records .mr-state p{margin:0 0 10px;color:var(--mr-muted);font-size:16px;line-height:1.5;}

/* ── 상자 폭에 따라 ────────────────────────────────────────────────── */
@container mr (max-width: 1020px){
  #my-records .mr-filters-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
  #my-records .mr-filters-row .mr-field:first-child{grid-column:1 / -1;}
}
/* 표의 고정 칸(656px)과 제목 칸(200px 남짓)이 다 들어가지 않으면 카드로 선다 */
@container mr (max-width: 859px){
  #my-records .mr-table{display:none;}
  #my-records .mr-cards{display:grid;}
}
@container mr (max-width: 640px){
  #my-records .mr-filters-sum{padding:16px 18px;}
  #my-records .mr-filters-body{padding:10px 18px 20px;}
  #my-records .mr-reset{right:46px;top:12px;}
  #my-records .mr-filters-row{grid-template-columns:minmax(0,1fr);}
  #my-records .mr-list-head{flex-direction:column;align-items:stretch;padding:16px 18px;}
  #my-records .mr-tools{justify-content:space-between;}
  #my-records .mr-tip-pop{right:auto;left:-8px;}
  #my-records .mr-tip-pop::after{right:auto;left:22px;}
  #my-records .mr-cards{padding:12px;}
  #my-records .mr-list-foot{padding:14px 12px 18px;}
  #my-records .mr-pager{gap:4px;}
}
@container mr (max-width: 440px){
  #my-records .mr-mcard-stats{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:12px;}
  #my-records .mr-mcard-top{flex-wrap:wrap;}
}

/* ── 상세 창 (body 바로 아래에 붙는다) ─────────────────────────────── */
html.mr-modal-open,
html.mr-modal-open body{overflow:hidden!important;}
#mrDetail.mr-scrim{
  position:fixed;
  inset:0;
  z-index:10050;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:40px 20px;
  background:rgba(17,24,39,.42);
  backdrop-filter:blur(2px);
  overflow:hidden;
}
#mrDetail .mr-modal{
  box-sizing:border-box;
  width:min(680px,100%);
  border-radius:24px;
  background:#fff;
  box-shadow:0 25px 50px -12px rgba(0,0,0,.25);
  color:var(--mr-body);
  animation:mr-modal-in .2s var(--mr-ease);
}
#mrDetail .mr-modal:focus{outline:none;}
@keyframes mr-modal-in{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:none;}}
#mrDetail .mr-modal-inner{max-height:calc(100vh - 80px);max-height:calc(100dvh - 80px);overflow:auto;overscroll-behavior:contain;border-radius:24px;}
#mrDetail .mr-modal-head{
  position:sticky;
  top:0;
  z-index:2;
  padding:24px 64px 18px 26px;
  background:#fff;
  border-bottom:1px solid var(--mr-line-soft);
}
#mrDetail .mr-modal-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;}
#mrDetail .mr-state-tag{display:inline-block;padding:2px 8px;border-radius:6px;font-size:15px;font-weight:700;line-height:1.4;}
#mrDetail .mr-state-good{background:var(--mr-good-bg);color:var(--mr-good);}
#mrDetail .mr-state-near{background:var(--mr-near-bg);color:var(--mr-near);}
#mrDetail .mr-state-low{background:var(--mr-low-bg);color:var(--mr-low);}
#mrDetail .mr-modal-title{margin:0;color:var(--mr-ink);font-size:22px;font-weight:700;line-height:1.4;overflow-wrap:anywhere;}
#mrDetail .mr-modal-when{margin:6px 0 0;color:var(--mr-muted);font-size:16px;font-variant-numeric:tabular-nums;}
#mrDetail .mr-modal-x{
  position:absolute;
  top:18px;
  right:18px;
  display:grid;
  place-items:center;
  width:40px;height:40px;
  padding:0;
  border:0;
  border-radius:9999px;
  background:var(--mr-head);
  color:var(--mr-muted);
  font-size:24px;
  line-height:1;
  cursor:pointer;
  transition:background-color .15s var(--mr-ease),color .15s var(--mr-ease);
}
#mrDetail .mr-modal-x:hover{background:var(--mr-accent-soft);color:var(--mr-accent-deep);}
#mrDetail .mr-modal-body{display:grid;gap:20px;padding:20px 26px 8px;}
#mrDetail .mr-msgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
#mrDetail .mr-msbox{display:grid;align-content:start;gap:8px;min-width:0;padding:16px 18px;border-radius:14px;background:var(--mr-head);}
#mrDetail .mr-msbox-acc{background:var(--mr-accent-wash);}
#mrDetail .mr-msbox em{color:var(--mr-muted);font-size:15px;font-style:normal;font-weight:600;}
#mrDetail .mr-msbox-val{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px;}
#mrDetail .mr-num{color:var(--mr-ink);font-size:28px;font-weight:700;line-height:1.15;font-variant-numeric:tabular-nums;}
#mrDetail .mr-msbox-val i{color:var(--mr-muted);font-size:15px;font-style:normal;font-weight:500;}
#mrDetail .mr-msbox-note{color:var(--mr-muted);font-size:14px;line-height:1.45;}
#mrDetail .mr-acc-lg{padding:7px 12px;font-size:26px;}
#mrDetail .mr-acc-lg small{font-size:16px;}
#mrDetail .mr-acc-lg.mr-acc-none{font-size:17px;}
#mrDetail .mr-msbox-acc .mr-acc-multi{display:grid;gap:6px;justify-items:start;}
#mrDetail .mr-block-title{margin:0;color:var(--mr-ink);font-size:17px;font-weight:700;}
#mrDetail .mr-subjects{display:grid;gap:10px;}
#mrDetail .mr-subj-table{width:100%;border-collapse:collapse;font-size:16px;font-variant-numeric:tabular-nums;}
#mrDetail .mr-subj-table :is(th,td){padding:9px 10px;border-bottom:1px solid var(--mr-line-soft);text-align:right;}
#mrDetail .mr-subj-table thead th{color:var(--mr-muted);font-size:15px;font-weight:600;}
#mrDetail .mr-subj-table :is(th,td):first-child{text-align:left;}
#mrDetail .mr-subj-table tbody th{color:var(--mr-ink);font-weight:600;}
#mrDetail .mr-subj-table .mr-acc{font-size:16px;padding:3px 8px;}
#mrDetail .mr-errblock{display:grid;gap:10px;}
#mrDetail .mr-errblock-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;}
#mrDetail .mr-errblock-sum{color:var(--mr-muted);font-size:16px;}
#mrDetail .mr-errblock-sum b{color:var(--mr-ink);font-size:18px;font-weight:700;font-variant-numeric:tabular-nums;}
#mrDetail .mr-errgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
#mrDetail .mr-errcard{display:grid;gap:4px;padding:14px 16px;border:1px solid var(--mr-line);border-radius:14px;}
#mrDetail .mr-errcard em{color:var(--mr-muted);font-size:15px;font-style:normal;font-weight:600;}
#mrDetail .mr-errcard b{color:var(--mr-ink);font-size:28px;font-weight:700;line-height:1.15;font-variant-numeric:tabular-nums;}
#mrDetail .mr-err-empty{margin:0;padding:14px 16px;border-radius:14px;background:var(--mr-head);color:var(--mr-muted);font-size:16px;line-height:1.5;}
#mrDetail .mr-modal-note{margin:0;color:var(--mr-muted);font-size:15px;line-height:1.55;}
#mrDetail .mr-modal-foot{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;padding:18px 26px 24px;}
#mrDetail .mr-modal-foot .mr-btn{min-height:48px;}
#mrDetail .mr-modal-foot a.mr-btn:hover{transform:translateY(-2px);}

@media (max-width: 640px){
  #mrDetail.mr-scrim{padding:12px;}
  #mrDetail .mr-modal-inner{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);}
  #mrDetail .mr-modal-head{padding:20px 60px 16px 18px;}
  #mrDetail .mr-modal-x{top:14px;right:12px;}
  #mrDetail .mr-modal-body{padding:16px 18px 6px;}
  #mrDetail .mr-msbox{padding:14px;}
  #mrDetail .mr-num,
  #mrDetail .mr-errcard b{font-size:24px;}
  #mrDetail .mr-errcard{padding:12px;}
  #mrDetail .mr-modal-foot{padding:14px 18px 18px;}
  #mrDetail .mr-modal-foot .mr-btn{flex:1 1 auto;}
}

@media (prefers-reduced-motion: reduce){
  #my-records *,
  #mrDetail,
  #mrDetail *{animation-duration:.01ms!important;transition-duration:.01ms!important;}
}
