/* 판정 요약 */
.verdicts { padding: 6px 16px 0; display: flex; gap: 12px; }
.verdict { flex: 1 1 0; min-width: 0; }
.vrule { width: 1px; background: var(--sep); }
.cap { font-size: 13px; color: var(--sec); }
.line { margin-top: 5px; display: flex; align-items: baseline; gap: 7px; }
.tier { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.sub { font-size: 13px; color: var(--sec); }
.bar { margin-top: 11px; height: 5px; border-radius: 3px; background: #EFEFF1; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; }

.band {
  margin-top: 20px;
  padding: 7px 16px;
  background: var(--band);
  border-top: 1px solid var(--sep);
  border-bottom: 1px solid var(--sep);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--sec);
}
.muted { color: var(--ter); }

.seg { margin-left: auto; display: flex; padding: 2px; background: #E8E8EB; border-radius: 7px; }
.seg button {
  min-height: 24px;
  padding: 3px 10px;
  background: transparent;
  color: #4A4A4F;
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
}
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; }

/* 분포 */
.stack { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: #EFEFF1; margin: 16px 16px 14px; }
.rows { padding-left: 16px; }
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--sep);
  font-size: 16px;
}
.dot { width: 10px; height: 10px; border-radius: 5px; flex: none; }
.row .n { margin-left: auto; color: var(--sec); }
.row.zero { color: var(--ter); }
.row.zero .n { color: var(--ter); }
.row.zero .dot { opacity: 0.35; }

/* 입력 */
.entrybar { padding: 12px 16px; display: flex; align-items: center; gap: 8px; }
.entrybar button {
  min-height: 32px;
  padding: 5px 12px;
  background: var(--fill);
  color: #4A4A4F;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}
.entrybar button.on { background: var(--ink); color: #fff; font-weight: 600; }
.search {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  padding: 0 11px;
  background: var(--fill);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.search svg { flex: none; }
#q {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
#q:focus { outline: none; }
#q::-webkit-search-cancel-button { -webkit-appearance: none; }

.cardwrap { padding: 4px 16px 24px; }
.cardmeta {
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  font-size: 13px;
  color: var(--sec);
}
.nav {
  margin-top: 26px;
  display: flex;
  gap: 10px;
}
.nav button {
  flex: 1 1 0;
  min-height: 46px;
  background: var(--fill);
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.nav button:disabled { color: var(--faint); }
/* 글자 없이 화살표만 두므로 글자를 키워 누를 곳이 분명하게 보이게 한다 */
.nav button.arrow { font-size: 24px; font-weight: 400; line-height: 1; padding-bottom: 3px; }
.nav button.primary { background: var(--ink); color: #fff; font-weight: 600; }
.nav button.primary:disabled { background: var(--fill); color: var(--faint); font-weight: 500; }

.mapname { margin-top: 6px; }
.mapname b { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }

.fields { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.fields input {
  height: 74px;
  background: #F5F5F7;
  border: 2px solid transparent;
  border-radius: 14px;
  color: var(--ink);
  font: inherit;
  font-size: 34px;
  font-weight: 600;
  text-align: center;
}
.fields input:focus { background: #fff; border-color: var(--ink); outline: none; }
#f-min { width: 58px; }
#f-sec, #f-cs { width: 88px; }
.colon { font-size: 28px; color: var(--faint); }

.norec { margin-top: 14px; text-align: center; }
.norec button {
  min-height: 44px;
  padding: 11px 18px;
  background: transparent;
  color: var(--ink);
  border: 1px solid #D8D8DC;
  border-radius: 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}

.verdictline { margin-top: 20px; text-align: center; font-size: 18px; font-weight: 600; }
.verdictline .sep2 { color: var(--faint); font-weight: 400; margin: 0 8px; }
.target { margin-top: 8px; text-align: center; font-size: 14px; color: var(--sec); line-height: 1.5; }

/* 목록 */
.lrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px 11px 0;
  margin-left: 16px;
  border-bottom: 1px solid var(--sep);
  font-size: 16px;
  width: calc(100% - 16px);
  background: none;
  border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit;
  color: inherit;
  text-align: left;
}
.lrow .nm { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .tm { color: var(--sec); }
.lrow .tg { width: 52px; text-align: right; font-weight: 600; }
.lrow.empty .tm { color: var(--faint); }
.groupsep {
  padding: 6px 16px;
  background: var(--band);
  border-top: 1px solid var(--sep);
  border-bottom: 1px solid var(--sep);
  font-size: 12px;
  color: var(--sec);
}

/* 난이도. 배경색은 루칭방 표의 행 색을 그대로 뽑았다. */
.badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.d-rookie { background: #FEF0A7; color: #6E5200; }
.d-l3     { background: #C9F5BA; color: #1D6630; }
.d-l2     { background: #BDEEFF; color: #0A5570; }
.d-l1     { background: #FEC8BC; color: #8A2F1C; }

.groupsep.d-rookie, .groupsep.d-l3, .groupsep.d-l2, .groupsep.d-l1 { font-weight: 600; }

/* 히스토리 */
.hitem { position: relative; overflow: hidden; border-bottom: 1px solid var(--sep); }
.hdel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #C8372B;
}
.hdel button {
  width: 100%;
  height: 100%;
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
.hrow {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 16px;
  background: #fff;
  font-size: 15px;
  touch-action: pan-y;
  transition: transform 0.18s ease;
}
.hrow .when { color: var(--sec); font-size: 13px; width: 96px; flex: none; }
.hrow .what { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .tg { font-weight: 600; }
.hrow.changed { background: var(--band); }

.empty-msg { padding: 28px 16px; text-align: center; color: var(--ter); font-size: 15px; }

/* 히스토리와 Snapshot */
.bandbtn {
  margin-left: auto;
  min-height: 26px;
  padding: 3px 9px;
  background: transparent;
  color: var(--ink);
  border: 1px solid #D8D8DC;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}
.bandbtn.back { margin-left: 0; margin-right: 10px; border: 0; padding: 3px 0; font-size: 13px; }
.hrow { width: 100%; border: 0; font-family: inherit; color: inherit; text-align: left; }
.snaphead { padding: 14px 16px 16px; border-bottom: 1px solid var(--sep); }
.snapwhat { font-size: 17px; font-weight: 600; }
.snaptier { margin-top: 6px; font-size: 16px; font-weight: 600; }
.snaptier .cap { font-weight: 400; color: var(--sec); font-size: 14px; }
.snaptier .sub { font-weight: 400; }
.snaptier .sep2 { color: var(--faint); font-weight: 400; margin: 0 8px; }

/* 저장 줄. 입력은 여기서 Save를 눌러야 기록이 된다 */
.savebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--sep);
  border-bottom: 1px solid var(--sep);
  background: var(--band);
  font-size: 13px;
}
#save-note.pending { color: var(--ink); font-weight: 600; }
#save-note.failed { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.saveacts { margin-left: auto; display: flex; gap: 8px; }
.saveacts button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: var(--fill);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.saveacts button.primary { background: var(--ink); color: #fff; font-weight: 600; }
.saveacts button:disabled { background: var(--fill); color: var(--faint); font-weight: 500; }

/* 아직 저장하지 않은 줄. 색은 군에만 쓰므로 굵기와 선으로만 가른다 */
.lrow.pending { border-left: 2px solid var(--ink); margin-left: 14px; padding-left: 8px; }
.lrow.pending .tm { color: var(--ink); font-weight: 600; }
.cardmeta .unsaved { font-weight: 600; color: var(--ink); }

/* Home에서 왜 숫자가 안 움직이는지 알려 주는 줄 */
.pending-note {
  display: block;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 10px 12px;
  border: 1px solid var(--sep);
  border-radius: 10px;
  background: var(--band);
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
}
.pending-note[hidden] { display: none; }
