/* [2026-10-14 설계 §4-D] 비슷한 문제 더 만들기 — 작은 창(js/editor-similar.js)
   ★창 크기는 고정이다★ — 만드는 중·목록·실패 어느 걸음에서도 같은 크기 · 목록만 안에서 스크롤(UI_GUIDELINES §0 고정 크기 모달).
   색은 토큰만 · 고르기 단추는 회색 테두리 → 고른 쪽만 면을 칠한다(넣기 = 파랑 옅은 면 · 빼기 = 회색 옅은 면). */
.es-overlay {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.es-box {
  width: min(560px, 100%); height: min(520px, calc(100vh - 32px));
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.es-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--border); }
.es-head-txt { flex: 1; min-width: 0; }
.es-head h2 { margin: 0; font-size: var(--text-lg); font-weight: 800; color: var(--text); word-break: keep-all; }
.es-orig { margin-top: 4px; font-size: var(--text-sm); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-x { flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--text-muted); cursor: pointer; font-size: var(--text-base); }
.es-x:hover { background: var(--bg-subtle); color: var(--text); }
.es-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 20px; }
.es-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--border); }

.es-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; word-break: keep-all; }
.es-state b { font-size: var(--text-base); color: var(--text); }
.es-sub { font-size: var(--text-sm); color: var(--text-muted); }
.es-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: esSpin .8s linear infinite; margin-bottom: 6px; }
@keyframes esSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .es-spin { animation: none; } }

.es-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.es-q { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface); }
.es-q.is-in { border-color: var(--primary); }
.es-r1 { display: flex; align-items: center; gap: 10px; }
.es-txt { flex: 1; min-width: 0; font-size: var(--text-sm); font-weight: 700; color: var(--text); word-break: keep-all; line-height: 1.45; }
.es-seg { flex-shrink: 0; display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.es-seg button { min-width: 52px; min-height: 36px; border: 0; background: var(--surface); color: var(--text-muted); font-size: var(--text-sm); font-weight: 700; cursor: pointer; }
.es-seg button + button { border-left: 1px solid var(--border); }
.es-seg button[aria-pressed="true"][data-es="in"] { background: var(--primary-light); color: var(--primary); }
.es-seg button[aria-pressed="true"][data-es="out"] { background: var(--bg-subtle); color: var(--text); }
.es-seg button:focus-visible, .es-x:focus-visible, .es-det summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.es-det { margin-top: 6px; font-size: var(--text-sm); color: var(--text-muted); }
.es-det summary { cursor: pointer; width: max-content; }
.es-opts { margin: 6px 0 0; padding-left: 20px; color: var(--text); }
.es-ans { margin-top: 4px; color: var(--text); font-weight: 700; }
.es-exp { margin-top: 2px; }

/* 넣은 카드 — 약 1초 얇은 테두리(어디 들어갔는지) */
#quizList .qm-item.es-flash { box-shadow: var(--shadow-focus); transition: box-shadow .2s; }
