/* =========================================================
   나의 오답노트 추가 조작부
   profile-social.js 의 공개 오답노트에는 .wnx-managed 가 붙지 않는다.
========================================================= */
#view-wrongnote .wnx-managed {
  position: relative;
  padding-left: 44px;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
#view-wrongnote .wnx-managed.wnx-selected {
  background: #fffafa;
  box-shadow: inset 3px 0 0 #d9483f;
}
.ri-word { position: relative; display: inline-block; }
#view-wrongnote .wnx-managed[hidden],
#view-wrongnote .wnx-managed .wn-del[hidden],
#view-wrongnote .wnx-managed .wnx-legacy-example { display: none !important; }

.wnx-select {
  position: absolute; left: 14px; top: 21px; z-index: 1;
  display: inline-grid; place-items: center; width: 14px; height: 14px; padding: 0;
  border: 1px solid #aebacc; border-radius: 2px; background: #fff; color: #c9352e;
  cursor: pointer; transition: .15s ease;
}
.wnx-select:hover, .wnx-select.selected {
  border-color: #d9483f; background: #fff5f3; color: #c9352e;
}
.wnx-hand-check {
  width: 13px; height: 11px; overflow: visible;
  stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round;
}
.wnx-select .wnx-hand-check { opacity: 0; transform: rotate(-5deg); }
.wnx-select.selected .wnx-hand-check { opacity: 1; }

.wnx-line-controls {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; vertical-align: middle;
}
.wnx-icon-btn, .wnx-plain-btn, .wnx-mastery-actions button, .wnx-toolbar-btn,
.wnx-test-speak, .wnx-test-primary, .wnx-test-secondary, .wnx-test-close {
  font: inherit; cursor: pointer;
}
.wnx-icon-btn {
  display: inline-grid; place-items: center; width: 29px; height: 29px; padding: 0;
  border: 1px solid #cbd6e5; border-radius: 8px; color: #364b67; background: #fff;
}
.wnx-icon-btn:hover { background: #edf3ff; border-color: #8ba7de; color: #2454a8; }
.wnx-icon-btn svg { width: 16px; height: 16px; }
.wnx-inline-example {
  display: inline-flex; flex-direction: column; gap: 2px; max-width: min(520px, 58vw);
  color: #3f526b; font-size: 1.04rem; font-weight: 650; line-height: 1.5; vertical-align: middle;
}
.wnx-inline-example b { color: #172a43; font-weight: 900; }
.wnx-inline-example small { color: #64748b; font-size: .89rem; font-weight: 700; line-height: 1.45; }
.wnx-example-sentence { display: inline; }
.wnx-example-speak {
  display: inline-flex; align-items: center; gap: 3px; min-height: 22px; margin-left: 7px; padding: 2px 5px;
  border: 1px solid #c9d7e5; border-radius: 4px; background: #f8fbff; color: #426481;
  font: inherit; font-size: .72rem; font-weight: 850; line-height: 1; vertical-align: middle; cursor: pointer;
}
.wnx-example-speak:hover { border-color: #7ca2c5; background: #edf6ff; color: #234f75; }
.wnx-example-speak svg { width: 12px; height: 12px; }
.wnx-plain-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px;
  border: 1px solid #d7dfeb; border-radius: 8px; background: #fff; color: #475a75;
  font-size: .72rem; font-weight: 800; line-height: 1;
}
.wnx-plain-btn:hover { border-color: #8ba7de; color: #2454a8; background: #f5f8ff; }
.wnx-plain-btn svg { width: 13px; height: 13px; }

.wnx-mastery {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px;
}
.wnx-folder-chip, .wnx-mastery-state {
  display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px;
  border-radius: 999px; font-size: .7rem; font-weight: 800; line-height: 1; white-space: nowrap;
}
.wnx-folder-chip { color: #48627d; background: #eef3f8; border: 1px solid #dbe5ef; }
.wnx-mastery-state { color: #6b7280; background: #f4f4f5; border: 1px solid #e4e4e7; }
.wnx-mastery-state.is-rough, .wnx-mastery-state.is-perfect { color: #a33b35; background: #fff5f3; border-color: #f2bbb5; }
.wnx-mastery-actions { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-left: auto; }
.wnx-mastery-actions button {
  min-height: 25px; padding: 4px 8px; border: 1px solid #d4deeb; border-radius: 7px;
  background: #fff; color: #52647c; font-size: .7rem; font-weight: 800;
}
.wnx-mastery-actions button:hover { border-color: #92aade; color: #294f9f; background: #f5f8ff; }
.wnx-mastery-actions .wnx-delete-btn:hover { border-color: #e3aaa9; color: #a14242; background: #fff5f5; }

.wnx-example {
  margin: 11px 0 2px; padding: 10px 12px; border: 1px solid #e0e8f2; border-radius: 9px;
  background: #f8fafc; color: #44546b; font-size: .82rem; line-height: 1.65;
}
.wnx-example b { display: block; margin-bottom: 3px; color: #30445f; font-size: .72rem; }
.wnx-example p { margin: 0; }
.wnx-example-ko { margin-top: 3px !important; color: #718198; }

.wnx-toolbar {
  display: flex; flex-direction: column; gap: 9px; margin-bottom: 3px; padding: 0 0 10px;
  border-bottom: 1px solid #e7edf5;
}
.wnx-toolbar-top, .wnx-toolbar-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
}
.wnx-filter-label { display: inline-flex; align-items: center; gap: 5px; color: #64748b; font-size: .78rem; font-weight: 800; }
.wnx-filter-label select, .wnx-toolbar-actions input {
  min-height: 30px; border: 1px solid #cfd9e7; border-radius: 7px; background: #fff; color: #34465f;
  font: inherit; font-size: .76rem; outline: none;
}
.wnx-filter-label select { max-width: 152px; padding: 0 24px 0 8px; }
.wnx-toolbar-actions input { width: 142px; padding: 0 9px; }
.wnx-filter-label select:focus, .wnx-toolbar-actions input:focus { border-color: #6b8ddb; box-shadow: 0 0 0 3px rgba(79,114,242,.12); }
.wnx-toolbar-btn {
  min-height: 30px; padding: 5px 9px; border: 1px solid #ced9e8; border-radius: 7px;
  background: #fff; color: #425873; font-size: .74rem; font-weight: 800;
}
.wnx-toolbar-btn:hover:not(:disabled) { border-color: #8fa9dc; color: #2454a8; background: #f5f8ff; }
.wnx-toolbar-btn:disabled { opacity: .45; cursor: default; }
.wnx-toolbar-btn.danger { color: #a34444; border-color: #e9c7c7; }
.wnx-toolbar-btn.danger:hover:not(:disabled) { background: #fff5f5; border-color: #dfa4a4; }
.wnx-selected-count { margin-left: auto; color: #687991; font-size: .75rem; font-weight: 800; }
.wnx-notice { min-height: 1em; color: #42658f; font-size: .74rem; font-weight: 700; }

.wnx-test-backdrop {
  position: fixed; inset: 0; z-index: 3200; display: grid; place-items: center; padding: 20px;
  background: rgba(12, 23, 42, .48); backdrop-filter: blur(2px);
}
.wnx-test-card {
  position: relative; width: min(100%, 460px); padding: 30px; border: 1px solid #d9e2ee; border-radius: 18px;
  background: #fff; box-shadow: 0 22px 60px rgba(10, 24, 50, .24); color: #1e2f47;
}
.wnx-test-eyebrow { margin: 0 0 8px; color: #4f72f2; font-size: .78rem; font-weight: 900; letter-spacing: .08em; }
.wnx-test-card h2 { margin: 0; color: #172a43; font-family: 'Noto Serif KR', serif; font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.2; word-break: break-word; }
.wnx-test-close {
  position: absolute; top: 12px; right: 13px; width: 31px; height: 31px; padding: 0;
  border: 0; border-radius: 8px; color: #66778f; background: transparent; font-size: 1.55rem; line-height: 1;
}
.wnx-test-close:hover { background: #f1f5f9; color: #243850; }
.wnx-test-speak {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 7px 10px;
  border: 1px solid #cbd7e7; border-radius: 8px; background: #f9fbff; color: #365479; font-size: .78rem; font-weight: 800;
}
.wnx-test-speak svg { width: 16px; height: 16px; }
.wnx-test-prompt { margin: 22px 0 10px; color: #5b6d85; font-size: .94rem; line-height: 1.6; }
.wnx-test-input-label { display: grid; gap: 6px; color: #52647b; font-size: .78rem; font-weight: 800; }
.wnx-test-input-label input {
  min-height: 42px; padding: 0 11px; border: 1px solid #cbd7e7; border-radius: 9px; color: #253a57; font: inherit; outline: none;
}
.wnx-test-input-label input:focus { border-color: #6386d8; box-shadow: 0 0 0 3px rgba(79,114,242,.13); }
.wnx-test-answer { margin-top: 15px; padding: 13px; border: 1px solid #d4e8da; border-radius: 10px; background: #f2fbf5; }
.wnx-test-answer b { display: block; margin-bottom: 3px; color: #48725b; font-size: .74rem; }
.wnx-test-answer strong { color: #1e5237; font-size: 1rem; }
.wnx-test-answer p { margin: 8px 0 0; color: #506b5a; font-size: .82rem; line-height: 1.55; }
.wnx-test-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; }
.wnx-test-primary, .wnx-test-secondary { min-height: 38px; padding: 0 13px; border-radius: 8px; font-size: .84rem; font-weight: 900; }
.wnx-test-primary { border: 1px solid #4268d1; background: #4f72f2; color: #fff; }
.wnx-test-primary:hover { background: #3f62d8; }
.wnx-test-secondary { border: 1px solid #ced8e5; background: #fff; color: #536680; }
.wnx-test-secondary:hover { background: #f6f8fb; }

/* 나의 오답노트: 보관함을 단순한 드롭다운이 아니라 두 학습방이 보이는 단어장으로 정리한다. */
.wnx-toolbar {
  gap: 11px; margin-bottom: 13px; padding: 0 0 13px;
  border-bottom: 1px solid #dfe7ef;
}
.wnx-toolbar-top { gap: 6px; display: grid; grid-template-columns: auto repeat(2, auto) auto 1fr auto; align-items: center; }
.wnx-toolbar-title { margin-right: 3px; color: #304760; font-size: .82rem; font-weight: 900; white-space: nowrap; }
.wnx-toolbar-title b { margin-left: 3px; color: #59708a; font-variant-numeric: tabular-nums; }
.wnx-list-select-bar {
  display: flex; align-items: center; gap: 9px; min-height: 34px; margin: 0 0 7px; padding: 0 0 0 8px;
  color: #738196; font-size: .78rem; font-weight: 800; line-height: 1;
}
.wnx-select-all {
  display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 9px;
  border: 1px solid #d3deeb; border-radius: 7px; background: #fff; color: #5f7288;
  box-sizing: border-box; font: inherit; font-size: .78rem; font-weight: 900; line-height: 1; cursor: pointer; white-space: nowrap;
}
.wnx-select-all:hover { border-color: #a9bed3; color: #315d88; background: #f7fafc; }
.wnx-select-all-box {
  display: inline-grid; place-items: center; width: 12px; height: 12px; flex: 0 0 12px;
  border: 1px solid #aebacc; border-radius: 2px; background: #fff;
}
.wnx-select-all.is-active { border-color: #d9483f; background: #fff5f3; color: #b83832; }
.wnx-select-all.is-active .wnx-select-all-box { border-color: #d9483f; }
.wnx-select-all .wnx-hand-check { width: 11px; height: 9px; opacity: 0; transform: rotate(-5deg); }
.wnx-select-all.is-active .wnx-hand-check { opacity: 1; }
.wnx-bulk-move {
  display: inline-flex; align-items: center; align-self: center; gap: 5px; min-height: 32px; color: #62748a;
  font-size: .78rem; font-weight: 900; line-height: 1; white-space: nowrap;
}
.wnx-bulk-move > span { display: inline-flex; align-items: center; min-height: 32px; }
.wnx-bulk-move select {
  display: block; box-sizing: border-box; min-height: 32px; margin: 0; padding: 0 25px 0 9px; border: 1px solid #d3deeb; border-radius: 7px;
  background: #fff; color: #40566f; font: inherit; font-size: .78rem; font-weight: 800; line-height: 1; outline: none;
}
.wnx-bulk-move select:focus { border-color: #7e9cc0; box-shadow: 0 0 0 3px rgba(79,114,242,.1); }
.wnx-bulk-action {
  box-sizing: border-box; min-height: 32px; padding: 4px 10px; border: 1px solid #c8d6e5; border-radius: 7px;
  background: #fff; color: #405d7a; font: inherit; font-size: .78rem; font-weight: 900; line-height: 1; cursor: pointer;
}
.wnx-bulk-action:hover:not(:disabled) { border-color: #7d9ebc; background: #f4f8fb; color: #294f77; }
.wnx-bulk-action:disabled { opacity: .45; cursor: default; }
.wnx-bulk-action.danger { border-color: #edc3c0; color: #a6413d; }
.wnx-bulk-action.danger:hover:not(:disabled) { border-color: #db8f89; background: #fff5f4; }
.wnx-cabinet-tab {
  min-height: 29px; padding: 4px 9px; border: 1px solid #d6e0ea; border-radius: 999px;
  background: #fff; color: #6b7d91; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}
.wnx-cabinet-tab:hover { border-color: #a9bed3; color: #315d88; background: #f7fafc; }
.wnx-cabinet-tab.is-active { border-color: #4b7297; background: #315d88; box-shadow: 0 3px 8px rgba(42, 77, 112, .15); color: #fff; }
.wnx-cabinet-tab.is-memorized.is-active { border-color: #b94038; background: #c9463f; }
.wnx-filter-label {
  display: inline-flex; align-items: center; gap: 5px; height: 29px; min-height: 29px;
  margin-left: 0; box-sizing: border-box; white-space: nowrap;
}
.wnx-filter-label select {
  width: 112px; max-width: 112px; height: 29px; min-height: 29px; margin: 0;
  box-sizing: border-box; color: #718196; font: inherit; font-size: .72rem; line-height: 1;
}
.wnx-test-launch {
  display: inline-flex; align-items: center; justify-content: center; min-height: 31px; padding: 5px 12px;
  border: 1px solid #315d88; border-radius: 7px; background: #315d88; color: #fff;
  font: inherit; font-size: .75rem; font-weight: 900; letter-spacing: -.02em; cursor: pointer;
  box-shadow: 0 4px 10px rgba(49, 93, 136, .15); transition: transform .14s ease, background .14s ease;
}
.wnx-test-launch:hover { background: #274e75; transform: translateY(-1px); }
.wnx-toolbar .wnx-test-launch { margin-left: 0; justify-self: end; }
.wnx-export-actions { display: inline-flex; align-items: center; justify-self: end; gap: 5px; }
.wnx-export-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 31px; padding: 5px 8px; border: 1px solid #b9c9d9; border-radius: 7px; background: #fff; color: #526d87; font: inherit; font-size: .7rem; font-weight: 800; line-height: 1; white-space: nowrap; cursor: pointer; transition: border-color .14s ease, background .14s ease, color .14s ease; }
.wnx-export-btn:hover { border-color: #7f9fbe; background: #f4f8fc; color: #24537e; }
.wnx-toolbar-actions { padding-top: 1px; }
.wnx-mastery { margin-top: 11px; padding-top: 9px; border-top: 1px solid #edf1f5; }
.wnx-folder-chip { color: #60758b; background: #f5f8fa; }
.wnx-mastery-state { min-width: 58px; justify-content: center; }
.wnx-memorize-btn {
  position: relative; display: inline-flex; align-items: center; gap: 3px; min-height: 22px !important; padding: 2px 5px !important;
  border-radius: 4px !important; color: #805f48; border-color: #e0c8b7; background: #fff9f4; overflow: hidden; line-height: 1;
}
.wnx-memorize-btn.is-memorized {
  color: #a54a3f; border-color: #e9b5a9; background: #fff0eb; box-shadow: none;
}
.wnx-memorize-btn .wnx-hand-check { width: 10px; height: 9px; opacity: 0; transform: rotate(-5deg); }
.wnx-memorize-btn.is-memorized .wnx-hand-check { opacity: 1; }

.wnx-test-footer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 13px; align-items: center;
  margin: 17px 0 2px; padding: 17px 18px; border: 1px solid #d5e0e9; border-left: 3px solid #315d88;
  border-radius: 10px; background: #f8fafc; box-shadow: 0 4px 14px rgba(37, 60, 83, .045);
}
.wnx-test-footer > div > span { display: block; margin-bottom: 3px; color: #71859a; font-size: .62rem; font-weight: 900; letter-spacing: .09em; }
.wnx-test-footer > div > strong { display: block; color: #294561; font-family: 'Noto Serif KR', serif; font-size: 1.02rem; }
.wnx-test-footer > div > p { margin: 4px 0 0; color: #7a899a; font-size: .74rem; line-height: 1.45; }
.wnx-test-footer > .wnx-test-launch { min-width: 74px; }
.wnx-practice-backdrop {
  position: fixed; z-index: 3300; inset: 0; display: grid; place-items: center; padding: 20px;
  background: rgba(24, 43, 64, .4); backdrop-filter: blur(3px);
}
.wnx-practice-card {
  position: relative; width: min(100%, 510px); padding: 29px; border: 1px solid #d8e2ea; border-radius: 15px;
  background: #fbfcfd; box-shadow: 0 25px 65px rgba(20, 40, 61, .22); color: #28445f;
}
.wnx-practice-kicker { margin: 0 0 6px; color: #6d8399; font-size: .65rem; font-weight: 900; letter-spacing: .11em; }
.wnx-practice-card h2 { margin: 0; color: #264563; font-family: 'Noto Serif KR', serif; font-size: 1.7rem; letter-spacing: -.04em; }
.wnx-practice-card > p:not(.wnx-practice-kicker) { margin: 10px 0 20px; color: #718195; font-size: .86rem; line-height: 1.6; word-break: keep-all; }
.wnx-practice-close { position: absolute; top: 12px; right: 13px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #738395; font-size: 1.45rem; cursor: pointer; }
.wnx-practice-close:hover { background: #eef3f7; color: #2d4f70; }
.wnx-practice-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wnx-practice-actions button { min-height: 104px; padding: 16px; border: 1px solid #ccd9e4; border-radius: 10px; background: #fff; color: #48647e; text-align: left; cursor: pointer; transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.wnx-practice-actions button:hover { border-color: #5c7f9f; box-shadow: 0 7px 16px rgba(34, 62, 88, .1); transform: translateY(-2px); }
.wnx-practice-actions b { display: block; margin-bottom: 7px; color: #294f77; font-family: 'Noto Serif KR', serif; font-size: 1.05rem; }
.wnx-practice-actions span { display: block; color: #7a8999; font-size: .73rem; line-height: 1.45; word-break: keep-all; }
.wn-public-test { margin-left: 9px; min-height: 29px; padding: 4px 9px; border: 1px solid #9fb6cb; border-radius: 7px; background: #fff; color: #315d88; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.wn-public-test:hover { border-color: #315d88; background: #f4f8fb; }

@media (max-width: 640px) {
  #view-wrongnote .wnx-managed { padding-left: 39px; }
  .wnx-select { left: 13px; top: 20px; }
  .wnx-line-controls { display: flex; width: 100%; margin: 8px 0 0; }
  .wnx-inline-example { max-width: 100%; }
  .wnx-mastery-actions { width: 100%; margin-left: 0; }
  .wnx-mastery-actions button { flex: 1 1 auto; }
  .wnx-toolbar-actions { align-items: stretch; }
  .wnx-toolbar-actions input { flex: 1 1 132px; }
  .wnx-toolbar-actions .wnx-toolbar-btn { flex: 1 1 auto; }
  .wnx-selected-count { margin-left: 0; }
  .wnx-test-card { padding: 26px 20px 20px; border-radius: 15px; }
  .wnx-toolbar-top { display: flex; align-items: center; }
  .wnx-toolbar-title { flex: 1 1 100%; }
  .wnx-list-select-bar { padding-left: 5px; }
  .wnx-filter-label { margin-left: 0; }
  .wnx-toolbar .wnx-test-launch { margin-left: 0; }
  .wnx-export-actions { flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; }
  .wnx-test-footer { grid-template-columns: 1fr; padding: 15px; }
  .wnx-test-footer > .wnx-test-launch { width: 100%; }
  .wnx-practice-card { padding: 25px 19px 19px; }
  .wnx-practice-actions { grid-template-columns: 1fr; }
}
