@eliceio/cdk-cli 1.2.1 → 1.3.0-contenttypes.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +59 -50
  2. package/es/cli.js +11 -2
  3. package/es/commands/build/index.js +12 -0
  4. package/es/commands/create/index.js +1 -0
  5. package/es/commands/create/scaffold.d.ts +2 -2
  6. package/es/commands/create/scaffold.js +3 -3
  7. package/es/commands/dev/index.d.ts +10 -1
  8. package/es/commands/dev/index.js +47 -7
  9. package/es/core/config.d.ts +20 -9
  10. package/es/core/config.js +53 -12
  11. package/es/core/project-check.d.ts +3 -2
  12. package/es/core/project-check.js +14 -3
  13. package/es/core/regex.d.ts +11 -0
  14. package/es/core/regex.js +41 -0
  15. package/es/core/sandbox.d.ts +26 -0
  16. package/es/core/sandbox.js +240 -30
  17. package/es/dev/check.d.ts +30 -0
  18. package/es/dev/check.js +224 -34
  19. package/es/dev/grading.d.ts +20 -1
  20. package/es/dev/grading.js +38 -7
  21. package/es/dev/host-page.js +1 -1
  22. package/es/dev/mock-api.d.ts +3 -1
  23. package/es/dev/mock-api.js +20 -11
  24. package/es/engines/vite/index.js +1 -1
  25. package/es/engines/vite/plugin.d.ts +2 -0
  26. package/es/engines/vite/plugin.js +33 -5
  27. package/es/rules/answers.d.ts +13 -0
  28. package/es/rules/answers.js +94 -0
  29. package/es/rules/check.js +70 -1
  30. package/es/rules/index.d.ts +1 -0
  31. package/es/rules/index.js +1 -0
  32. package/es/rules/size.d.ts +31 -0
  33. package/es/rules/size.js +58 -0
  34. package/es/rules/types.d.ts +12 -0
  35. package/es/rules.json.js +2 -2
  36. package/package.json +2 -2
  37. package/rules.json +32 -3
  38. package/skills/_shared/always.md +3 -3
  39. package/skills/_shared/references/00-what-the-person-decides.md +1 -1
  40. package/skills/_shared/references/02-design-the-material.md +10 -7
  41. package/skills/_shared/references/03-create-the-project.md +2 -1
  42. package/skills/_shared/references/05-screen-code.md +49 -22
  43. package/skills/_shared/references/06-using-the-quiz-template.md +7 -6
  44. package/skills/_shared/references/08-fix-check-errors.md +23 -22
  45. package/skills/_shared/references/09-check.md +7 -6
  46. package/skills/_shared/references/12-upload-with-the-material-mcp.md +13 -13
  47. package/skills/_shared/references/13-edit-screen-design.md +122 -0
  48. package/skills/_shared/references/14-layouts.md +96 -0
  49. package/skills/elice-content-check/SKILL.md +2 -2
  50. package/skills/elice-content-create/SKILL.md +1 -1
  51. package/skills/elice-content-migrate/SKILL.md +1 -1
  52. package/templates/_shared/lib/cdk-mock.d.ts +30 -3
  53. package/templates/_shared/lib/cdk-mock.js +88 -15
  54. package/templates/_shared/lib/elice-content-editor.js +89 -58
  55. package/templates/_shared/lib/elice-content.css +1313 -126
  56. package/templates/_shared/lib/elice-content.d.ts +162 -23
  57. package/templates/_shared/lib/elice-content.js +863 -82
  58. package/templates/_shared/lib/icons/empty-content.d.ts +2 -0
  59. package/templates/_shared/lib/icons/empty-content.js +11 -0
  60. package/templates/_shared/lib/icons/file-video.d.ts +2 -0
  61. package/templates/_shared/lib/icons/file-video.js +11 -0
  62. package/templates/_shared/lib/icons/file.d.ts +2 -0
  63. package/templates/_shared/lib/icons/file.js +11 -0
  64. package/templates/blank/README.md +5 -3
  65. package/templates/blank/edit.html +8 -2
  66. package/templates/blank/index.html +6 -1
  67. package/templates/blank/instructor.html +6 -1
  68. package/templates/blank/template.json +1 -1
  69. package/templates/quiz/README.md +28 -12
  70. package/templates/quiz/core/behaviors.d.ts +13 -7
  71. package/templates/quiz/core/behaviors.js +36 -51
  72. package/templates/quiz/core/editor.d.ts +10 -0
  73. package/templates/quiz/core/editor.js +334 -8
  74. package/templates/quiz/core/markdown.d.ts +4 -0
  75. package/templates/quiz/core/markdown.js +65 -11
  76. package/templates/quiz/core/model.d.ts +34 -1
  77. package/templates/quiz/core/model.js +86 -5
  78. package/templates/quiz/core/rich-text.d.ts +19 -0
  79. package/templates/quiz/core/rich-text.js +521 -0
  80. package/templates/quiz/edit.html +12 -3
  81. package/templates/quiz/index.html +12 -3
  82. package/templates/quiz/screens/edit.js +217 -48
  83. package/templates/quiz/screens/learn.js +90 -14
  84. package/templates/quiz/styles.css +840 -678
  85. package/templates/quiz/template.json +9 -2
  86. package/templates/quiz/ui/templates/edit.d.ts +18 -5
  87. package/templates/quiz/ui/templates/edit.js +309 -71
  88. package/templates/quiz/ui/templates/group.js +19 -8
  89. package/templates/quiz/ui/templates/order.js +25 -24
  90. package/templates/quiz/ui/templates/page.js +19 -8
  91. package/templates/quiz/ui/templates/question.js +2 -2
  92. package/templates/quiz/ui/texts.js +72 -25
  93. package/templates/quiz/ui/theme.css +8 -9
  94. package/templates/steps/README.md +77 -0
  95. package/templates/steps/commentary.txt +7 -0
  96. package/templates/steps/edit.html +21 -0
  97. package/templates/steps/gitignore +4 -0
  98. package/templates/steps/index.html +69 -0
  99. package/templates/steps/metadata.json +9 -0
  100. package/templates/steps/package.json +13 -0
  101. package/templates/steps/screens/edit.js +32 -0
  102. package/templates/steps/screens/learn.js +108 -0
  103. package/templates/steps/styles.css +54 -0
  104. package/templates/steps/template.json +6 -0
@@ -1,12 +1,107 @@
1
1
  /* 퀴즈 앱 스타일. 색 · 간격 · 모서리 값은 ui/theme.css(그 아래는 EDS 토큰 lib/elice-tokens.css), 모양은 EDS 컴포넌트 명세를 따릅니다
2
2
  보기 = RadioCard · 유형 표시 = Tag(muted) · 해설 = Accordion */
3
3
 
4
+ /* 결과 아이콘 (원 안 ✓ · ✕, Font Awesome circle-check · circle-xmark 모양). mask로 쓰고 색은 결과 색 */
5
+ :root {
6
+ --qz-icon-correct: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z'/%3E%3C/svg%3E");
7
+ --qz-icon-wrong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z'/%3E%3C/svg%3E");
8
+ }
9
+
4
10
  /* ---------- 학생 ---------- */
5
- .qz-title {
6
- margin: 0;
11
+ /* 학생 화면 틀 (index.html body.qz-page): 제출 바는 화면 아래 전체 너비, 내용은 가운데 720px */
12
+ body.qz-page {
13
+ display: flex;
14
+ flex-direction: column;
15
+ min-height: 100dvh;
16
+ padding: 24px 16px 0;
7
17
  }
8
- .qz-lead {
9
- color: var(--ec-muted);
18
+ body.qz-page main {
19
+ flex: 1;
20
+ width: 100%;
21
+ padding-bottom: 24px;
22
+ }
23
+ body.qz-page .ec-result {
24
+ width: 100%;
25
+ }
26
+ body.qz-page .ec-submitbar {
27
+ z-index: 8;
28
+ max-width: none;
29
+ margin: 0 -16px;
30
+ padding: 12px max(16px, 50% - 360px);
31
+ }
32
+ /* pattern 퀴즈: 키트 점수 줄은 감추고 문제 카드의 정답 · 오답과 아래 한 줄(.qz-overall)로 알린다 */
33
+ body.qz-score-hidden .ec-result.ok,
34
+ body.qz-score-hidden .ec-result.no {
35
+ display: none;
36
+ }
37
+ .qz-result.qz-overall {
38
+ box-sizing: border-box;
39
+ width: 100%;
40
+ max-width: 720px;
41
+ margin: 0 auto 16px;
42
+ }
43
+ /* 불러오는 자리 (ui/templates/page.js loading · HTML의 #app 안): 질문 막대 + 보기 막대 넷.
44
+ 0.2초 기다렸다 나타나 빨리 열리면 보이지 않고, 막대는 2초마다 천천히 옅어졌다 돌아온다 */
45
+ .qz-skeleton {
46
+ display: flex;
47
+ flex-direction: column;
48
+ gap: var(--qz-list-gap);
49
+ opacity: 0;
50
+ animation: qz-sk-show 0s linear 0.2s forwards;
51
+ }
52
+ @keyframes qz-sk-show {
53
+ to {
54
+ opacity: 1;
55
+ }
56
+ }
57
+ .qz-sk {
58
+ display: block;
59
+ border-radius: var(--qz-radius);
60
+ background: color-mix(in srgb, var(--eds-text-primary) 11%, transparent);
61
+ animation: qz-sk-pulse 2s ease-in-out 0.5s infinite;
62
+ }
63
+ .qz-sk-title {
64
+ width: 70%;
65
+ height: 24px;
66
+ margin-bottom: 8px;
67
+ border-radius: 4px;
68
+ }
69
+ .qz-sk-option {
70
+ height: 52px;
71
+ }
72
+ @keyframes qz-sk-pulse {
73
+ 0%,
74
+ 100% {
75
+ opacity: 1;
76
+ }
77
+ 50% {
78
+ opacity: 0.4;
79
+ }
80
+ }
81
+ @media (prefers-reduced-motion: reduce) {
82
+ .qz-sk {
83
+ animation: none;
84
+ }
85
+ }
86
+ /* 불러오는 자리에서 내용으로 바뀔 때 0.15초 나타나기 */
87
+ .qz-enter {
88
+ animation: qz-enter 0.15s ease-out;
89
+ }
90
+ @keyframes qz-enter {
91
+ from {
92
+ opacity: 0;
93
+ }
94
+ }
95
+ @media (prefers-reduced-motion: reduce) {
96
+ .qz-enter {
97
+ animation: none;
98
+ }
99
+ }
100
+ /* 한국어 문장이 단어 중간에서 줄바꿈되지 않게 */
101
+ .qz-question-title,
102
+ .qz-option > span {
103
+ overflow-wrap: anywhere;
104
+ word-break: keep-all;
10
105
  }
11
106
  .qz-muted {
12
107
  color: var(--ec-muted);
@@ -24,11 +119,28 @@
24
119
  gap: var(--qz-card-gap);
25
120
  min-width: 0;
26
121
  }
122
+ /* 결과는 카드 테두리가 아니라 학생이 낸 답(고른 보기 · 쓴 답 · 놓은 칸)에 결과 색으로 보인다 */
27
123
  .qz-question[data-result='correct'] {
28
- border-color: var(--qz-correct);
124
+ --qz-result-bg: var(--qz-correct-bg);
125
+ --qz-result-border: var(--qz-correct);
29
126
  }
30
127
  .qz-question[data-result='wrong'] {
31
- border-color: var(--qz-wrong);
128
+ --qz-result-bg: var(--qz-wrong-bg);
129
+ --qz-result-border: var(--qz-wrong);
130
+ }
131
+ .qz-question[data-result] .qz-text:not(:placeholder-shown) {
132
+ border-color: var(--qz-result-border);
133
+ }
134
+ /* 순서 맞추기: 고른 보기마다 결과 색 테두리 · 번호 */
135
+ .qz-question[data-result] .qz-order-option.is-picked {
136
+ border-color: var(--qz-result-border);
137
+ }
138
+ .qz-question[data-result] .qz-order-option.is-picked .qz-order-no {
139
+ background: var(--qz-result-border);
140
+ }
141
+ /* 그룹 분류: 그룹에 놓은 보기마다 결과 색 테두리 */
142
+ .qz-question[data-result] .qz-group .qz-chip-group {
143
+ border-color: var(--qz-result-border);
32
144
  }
33
145
  /* EDS subtitle2: 18px / 800 / 1.5. legend를 테두리 위가 아니라 카드 안에 두려고 float */
34
146
  .qz-question-head {
@@ -79,8 +191,8 @@
79
191
  color: var(--ec-muted);
80
192
  }
81
193
 
82
- /* RadioCard: 간격 8px · 여백 20px · 모서리 12px · 테두리 surface.border,
83
- hover action.hover, checked = primary 테두리 + primary.opacity02 배경 */
194
+ /* 보기 카드: 간격 8px · 여백 16px · 모서리 12px · 회색 면(테두리 없음),
195
+ hover action.hover, checked = primary.opacity03 면 (값은 ui/theme.css --qz-option-*) */
84
196
  .qz-options {
85
197
  display: flex;
86
198
  flex-direction: column;
@@ -148,6 +260,34 @@
148
260
  .qz-question:disabled .qz-option:hover {
149
261
  background: var(--qz-option-bg);
150
262
  }
263
+ /* 제출 뒤 고른 보기: 결과 색 테두리, 면은 고르기 전 색, 단추 자리에 ✓ · ✕ 동그라미 (색만으로 구분하지 않게) */
264
+ .qz-question[data-result] .qz-option:has(input:checked),
265
+ .qz-question[data-result] .qz-option:has(input:checked):hover {
266
+ border-color: var(--qz-result-border);
267
+ background: var(--qz-option-bg);
268
+ }
269
+ .qz-question[data-result] .qz-option input:checked {
270
+ appearance: none;
271
+ box-sizing: border-box;
272
+ width: 18px;
273
+ height: 18px;
274
+ margin: 0;
275
+ padding: 0;
276
+ border: 0;
277
+ border-radius: 0;
278
+ background: var(--qz-result-border);
279
+ mask: none center / contain no-repeat;
280
+ }
281
+ .qz-question[data-result] .qz-option input[type='checkbox']:checked {
282
+ width: 20px;
283
+ height: 20px;
284
+ }
285
+ .qz-question[data-result='correct'] .qz-option input:checked {
286
+ mask-image: var(--qz-icon-correct);
287
+ }
288
+ .qz-question[data-result='wrong'] .qz-option input:checked {
289
+ mask-image: var(--qz-icon-wrong);
290
+ }
151
291
  .qz-text-field {
152
292
  display: flex;
153
293
  flex-direction: column;
@@ -158,23 +298,33 @@
158
298
  resize: vertical;
159
299
  }
160
300
 
161
- /* Alert standard: success / error. 색만으로 구분하지 않게 ✓ · ✕ 기호를 함께 (기호는 화면 읽기에서 읽지 않음) */
301
+ /* Alert standard: success / error. 색만으로 구분하지 않게 ✓ · ✕ 아이콘을 함께 (::before 그림이라 화면 읽기에서 읽지 않음) */
162
302
  .qz-result {
163
303
  margin: 0;
164
- padding: 8px 12px;
304
+ padding: 16px;
165
305
  border-radius: var(--qz-radius);
166
- font-weight: var(--eds-fw-bold);
306
+ font-size: var(--eds-fs-body1);
307
+ line-height: var(--eds-lh-body1);
308
+ font-weight: var(--eds-fw-semibold);
309
+ }
310
+ .qz-result[data-result]:not([hidden]) {
311
+ display: flex;
312
+ align-items: center;
313
+ gap: 10px;
167
314
  }
168
315
  .qz-result[data-result]::before {
169
- margin-right: 6px;
316
+ content: '';
317
+ flex: none;
318
+ width: 20px;
319
+ height: 20px;
320
+ background: currentColor;
321
+ mask: none center / contain no-repeat;
170
322
  }
171
323
  .qz-result[data-result='correct']::before {
172
- content: '✓';
173
- content: '✓' / '';
324
+ mask-image: var(--qz-icon-correct);
174
325
  }
175
326
  .qz-result[data-result='wrong']::before {
176
- content: '✕';
177
- content: '✕' / '';
327
+ mask-image: var(--qz-icon-wrong);
178
328
  }
179
329
  .qz-result[data-result='correct'] {
180
330
  color: var(--qz-correct);
@@ -194,17 +344,27 @@
194
344
  cursor: pointer;
195
345
  font-weight: var(--eds-fw-bold);
196
346
  }
347
+ /* 결과가 보이면 해설은 결과 상자 아래쪽에 이어 붙인다 (제목 줄 없이, 같은 결과 색 면) */
348
+ .qz-question > .qz-result[data-result]:has(+ .qz-explanation:not([hidden])) {
349
+ border-radius: var(--qz-radius) var(--qz-radius) 0 0;
350
+ padding-bottom: 4px;
351
+ }
352
+ .qz-question > .qz-result[data-result] + .qz-explanation:not([hidden]) {
353
+ margin-top: calc(-1 * var(--qz-card-gap));
354
+ padding: 0 16px 16px;
355
+ border-radius: 0 0 var(--qz-radius) var(--qz-radius);
356
+ background: var(--qz-result-bg);
357
+ color: var(--eds-text-primary);
358
+ }
359
+ .qz-question > .qz-result[data-result] + .qz-explanation summary {
360
+ display: none;
361
+ }
197
362
 
198
- /* 끌어 놓기 공통 */
363
+ /* 끌어 놓기 (그룹 분류): 아직 놓지 않은 보기 줄 */
199
364
  .qz-pool {
200
365
  display: flex;
201
366
  flex-wrap: wrap;
202
367
  gap: var(--qz-list-gap);
203
- min-height: var(--qz-slot-min-height);
204
- padding: 12px;
205
- border: 1px dashed var(--qz-border);
206
- border-radius: var(--qz-radius-card);
207
- background: var(--qz-surface-muted);
208
368
  align-content: flex-start;
209
369
  }
210
370
  .qz-chip-option {
@@ -233,14 +393,27 @@
233
393
  .qz-chip-option[data-dragging] {
234
394
  opacity: 0.38;
235
395
  }
236
- /* 그룹 분류 보기: 바깥(.qz-chip-option)이 보기 모양, 안에 고르기 버튼과 빼기 버튼이 형제로 있다 */
396
+ /* 그룹 분류 보기: 바깥(.qz-chip-option)이 보기 모양, 안에 고르기 버튼과 빼기 버튼이 형제로 있다.
397
+ 보기 카드처럼 회색 면 · 테두리 없음, 앞에 끌기 손잡이 점 */
237
398
  .qz-chip-group {
238
399
  gap: 4px;
400
+ border-color: transparent;
401
+ background: var(--qz-option-bg);
402
+ }
403
+ .qz-chip-group:hover {
404
+ background: var(--qz-option-hover-bg);
405
+ }
406
+ .qz-chip-grip {
407
+ flex: none;
408
+ color: var(--eds-text-tertiary);
239
409
  }
240
410
  .qz-chip-group:has(.qz-chip-x) {
241
411
  padding-right: 6px;
242
412
  }
243
413
  .qz-chip-pick {
414
+ display: inline-flex;
415
+ align-items: center;
416
+ gap: 6px;
244
417
  min-height: 0;
245
418
  padding: 0;
246
419
  border: 0;
@@ -300,71 +473,134 @@
300
473
  background: var(--eds-primary-opacity02);
301
474
  }
302
475
 
303
- /* 순서 맞추기 */
304
- .qz-order {
305
- display: grid;
306
- grid-template-columns: 1fr auto 1fr;
307
- gap: var(--qz-card-gap);
308
- align-items: start;
476
+ /* 순서 맞추기: 보기 목록에서 정답 순서대로 누르면 번호가 붙는다 (보기 카드와 같은 면) */
477
+ .qz-order-pick {
478
+ display: flex;
479
+ flex-direction: column;
480
+ gap: 12px;
309
481
  }
310
- .qz-order-arrow {
311
- align-self: center;
312
- color: var(--qz-text-muted);
313
- font-size: 20px;
482
+ .qz-order-head {
483
+ display: flex;
484
+ justify-content: space-between;
485
+ align-items: center;
486
+ gap: 12px;
487
+ min-height: 30px;
488
+ }
489
+ .qz-order-head .qz-link[data-hidden] {
490
+ visibility: hidden;
314
491
  }
315
- .qz-slots {
316
- list-style: none;
492
+ .qz-order-hint {
317
493
  margin: 0;
318
- padding: 0;
494
+ color: var(--eds-text-secondary);
495
+ font-size: var(--eds-fs-body2);
496
+ }
497
+ .qz-order-list {
319
498
  display: flex;
320
499
  flex-direction: column;
321
500
  gap: var(--qz-list-gap);
322
501
  }
323
- .qz-slot {
502
+ button.qz-order-option {
324
503
  display: flex;
325
504
  align-items: center;
326
- gap: 10px;
327
- min-height: var(--qz-slot-min-height);
328
- padding: 8px 12px;
329
- border: 1px dashed var(--qz-border);
330
- border-radius: var(--qz-radius-card);
331
- background: var(--qz-surface);
505
+ gap: 12px;
506
+ width: 100%;
507
+ min-height: 44px;
508
+ padding: var(--qz-option-padding);
509
+ border: 1px solid var(--qz-option-border);
510
+ border-radius: var(--qz-option-radius);
511
+ background: var(--qz-option-bg);
512
+ color: inherit;
513
+ font: inherit;
514
+ font-size: var(--eds-fs-body1);
515
+ font-weight: inherit;
516
+ line-height: inherit;
517
+ text-align: left;
518
+ white-space: normal;
519
+ cursor: pointer;
520
+ transition:
521
+ background-color 150ms ease-in-out,
522
+ border-color 150ms ease-in-out;
523
+ }
524
+ button.qz-order-option:hover {
525
+ background: var(--qz-option-hover-bg);
526
+ }
527
+ button.qz-order-option.is-picked,
528
+ button.qz-order-option.is-picked:hover {
529
+ background: var(--qz-option-checked-bg);
530
+ }
531
+ button.qz-order-option[aria-disabled='true'] {
532
+ opacity: 0.5;
533
+ cursor: not-allowed;
332
534
  }
333
- .qz-slot-no {
535
+ button.qz-order-option:focus-visible {
536
+ outline: 2px solid var(--qz-accent);
537
+ outline-offset: 2px;
538
+ }
539
+ .qz-order-no {
334
540
  flex: none;
335
- width: 24px;
336
- height: 24px;
337
- border-radius: 50%;
338
- background: var(--qz-accent-softer);
339
- color: var(--qz-accent);
340
541
  display: grid;
341
542
  place-items: center;
342
- font-size: 12px;
543
+ width: 24px;
544
+ height: 24px;
545
+ border-radius: 6px;
546
+ background: color-mix(in srgb, var(--eds-text-primary) 8%, transparent);
547
+ color: var(--qz-accent-contrast);
548
+ font-size: var(--eds-fs-body2);
343
549
  font-weight: var(--eds-fw-bold);
550
+ line-height: 1;
551
+ }
552
+ .qz-order-option.is-picked .qz-order-no {
553
+ background: var(--qz-accent);
554
+ }
555
+ .qz-order-text {
556
+ min-width: 0;
557
+ white-space: normal;
558
+ overflow-wrap: anywhere;
559
+ word-break: keep-all;
560
+ }
561
+ .qz-question:disabled button.qz-order-option {
562
+ cursor: default;
344
563
  }
345
564
 
346
- /* 그룹 분류 */
565
+ /* 그룹 분류: 위에 보기(풀), 아래에 그룹 상자 격자 (그룹 수에 따라 1 · 2 · 3열, 좁은 화면은 1열) */
347
566
  .qz-groups {
567
+ display: flex;
568
+ flex-direction: column;
569
+ gap: var(--qz-card-gap);
570
+ }
571
+ .qz-group-grid {
348
572
  display: grid;
349
- grid-template-columns: 1fr minmax(0, 1fr) 1fr;
573
+ grid-template-columns: repeat(var(--qz-group-cols, 2), minmax(0, 1fr));
350
574
  gap: var(--qz-card-gap);
351
575
  align-items: start;
576
+ margin-top: 8px;
352
577
  }
353
- .qz-group-col {
354
- display: flex;
355
- flex-direction: column;
356
- gap: var(--qz-card-gap);
578
+ .qz-group-grid[data-cols='1'] {
579
+ --qz-group-cols: 1;
580
+ }
581
+ .qz-group-grid[data-cols='3'] {
582
+ --qz-group-cols: 3;
357
583
  }
358
584
  .qz-group {
359
- border: 1px solid var(--qz-border);
360
585
  border-radius: var(--qz-radius-card);
361
- background: var(--qz-surface);
362
- padding: 12px;
586
+ background: var(--qz-surface-muted);
587
+ padding: 16px;
363
588
  cursor: pointer;
364
589
  }
590
+ .qz-group .qz-chip-group {
591
+ background: var(--qz-surface);
592
+ }
593
+ .qz-group .qz-chip-group:hover {
594
+ background: linear-gradient(var(--qz-hover), var(--qz-hover)), var(--qz-surface);
595
+ }
596
+ .qz-group .ec-dropzone {
597
+ background: none;
598
+ }
365
599
  .qz-group-name {
366
600
  margin: 0 0 8px;
367
- font-size: var(--eds-fs-body2);
601
+ color: var(--eds-text-primary);
602
+ font-size: var(--eds-fs-body1);
603
+ line-height: var(--eds-lh-body1);
368
604
  font-weight: var(--eds-fw-bold);
369
605
  }
370
606
  .qz-group-items {
@@ -397,6 +633,10 @@
397
633
  font-weight: var(--eds-fw-bold);
398
634
  margin-bottom: 6px;
399
635
  }
636
+ .qz-pool-head > span {
637
+ color: var(--eds-text-secondary);
638
+ font-weight: var(--eds-fw-medium);
639
+ }
400
640
 
401
641
  @media (max-width: 767.98px) {
402
642
  /* 좁은 화면: 문항 머리의 아이콘 버튼을 좁혀 유형 이름이 덜 잘리게 */
@@ -406,19 +646,9 @@
406
646
  .qe-card-head .ec-icon-button {
407
647
  width: 32px;
408
648
  }
409
- .qz-order {
649
+ .qz-group-grid {
410
650
  grid-template-columns: 1fr;
411
651
  }
412
- .qz-order-arrow {
413
- transform: rotate(90deg);
414
- justify-self: center;
415
- }
416
- .qz-groups {
417
- grid-template-columns: 1fr;
418
- }
419
- .qz-group-pool {
420
- order: -1;
421
- }
422
652
  /* 좁은 화면: 그룹 고르기는 보기 글 아래 줄로 (보기 글 칸이 좁아지지 않게) */
423
653
  .qe-option:has(.qe-answer-group) {
424
654
  display: grid;
@@ -435,683 +665,365 @@
435
665
  }
436
666
 
437
667
  /* ---------- 편집 ---------- */
438
- .qe-card {
439
- display: flex;
440
- flex-direction: column;
441
- gap: 16px;
442
- padding: var(--qz-card-padding);
443
- border: 0;
444
- border-radius: var(--qz-radius-card);
445
- background: var(--qz-surface);
668
+ /* 편집 화면의 공용 모양(회색 바탕 · 흰 저장 바 · 카드 · 밑줄 칸 · 섹션 · "+ 추가" 열기 버튼 · 토글 칩 · 보기 줄 · 정답 표시 ·
669
+ 추가 버튼 · ⓘ 안내 · 스낵바)은 키트 lib/elice-content.css "편집 화면" 절이 그린다: edit.html의 <body class="ec-edit-page">와
670
+ ui/templates/edit.js가 qe-*와 함께 붙이는 .ec-* 클래스. 여기에는 퀴즈에만 있는 것: 라벨 있는 칸 · 정답 오류 ·
671
+ 그룹 분류 · 순서 맞추기 편집판, 그리고 퀴즈만 키트와 다르게 그리는 곳(연주님 퀴즈 수정본) */
672
+
673
+ /* 퀴즈만: 저장 바는 페이지와 같은 회색 바탕 (키트 기본은 흰 바) */
674
+ body.ec-edit-page .ec-submitbar {
675
+ background: var(--ec-edit-page-bg);
446
676
  }
447
- .qe-card-head {
448
- display: flex;
449
- /* 좁은 화면에서도 ↑ · ↓ · 삭제가 다음 줄로 넘어가지 않게, 대신 유형 선택이 줄어듦 */
450
- flex-wrap: nowrap;
451
- align-items: center;
452
- gap: 8px;
453
- font-size: var(--eds-fs-subtitle2);
454
- font-weight: var(--eds-fw-extrabold);
677
+ /* 퀴즈만: 정답으로 고른 보기 줄은 밑줄 색 대신 줄 끝 "정답" 표시로 (.qe-correct-tag). 밑줄은 다른 줄과 같게 */
678
+ .qe-option[data-correct] .qe-option-text {
679
+ border-bottom-color: var(--ec-border);
455
680
  }
456
- .qe-card-head > strong {
457
- flex: none;
458
- white-space: nowrap;
459
- /* <strong>의 기본 굵기(bolder)를 쓰지 않고 semibold로 고정 */
681
+ .qe-option[data-correct] .qe-option-text:hover:not(:focus) {
682
+ border-bottom-color: var(--ec-edit-hover-line);
683
+ }
684
+ /* 퀴즈만: "+ 문항 추가"는 강조색 윤곽선 버튼 (테두리 강조색 50%, 높이 40px). 키트 기본은 회색 점선 */
685
+ button.qe-add-question {
686
+ min-height: 0;
687
+ padding: 7px 15px;
688
+ border: 1px solid color-mix(in srgb, var(--qz-accent) 50%, transparent);
689
+ border-radius: 8px;
690
+ background: none;
691
+ color: var(--qz-accent);
692
+ font-size: 14px;
693
+ line-height: 24px;
460
694
  font-weight: var(--eds-fw-semibold);
461
695
  }
462
- .qe-type {
463
- width: auto;
464
- min-width: 0;
465
- flex: 0 1 auto;
466
- text-overflow: ellipsis;
467
- margin-right: auto;
468
- font-size: var(--eds-fs-body2);
469
- /* 문항 머리(굵은 글씨)를 물려받지 않게 */
470
- font-weight: 400;
696
+ @media (hover: hover) {
697
+ button.qe-add-question:hover {
698
+ border-color: var(--qz-accent);
699
+ background: var(--eds-primary-opacity01);
700
+ color: var(--qz-accent);
701
+ }
471
702
  }
472
- .qe-field {
473
- display: flex;
474
- flex-direction: column;
475
- gap: 6px;
703
+ button.qe-add-question:focus-visible,
704
+ button.qe-add-question:active {
705
+ background: color-mix(in srgb, var(--qz-accent) 30%, transparent);
476
706
  }
477
- .qe-label {
478
- font-weight: var(--eds-fw-bold);
479
- display: flex;
480
- align-items: center;
481
- gap: 8px;
707
+ button.qe-add-question:disabled {
708
+ border-color: var(--eds-surface-border);
709
+ background: none;
710
+ color: var(--eds-action-disabled);
482
711
  }
483
- .qe-required {
484
- color: var(--eds-error-main);
712
+ /* 퀴즈만: 그룹 상자 · 오답 보기 상자 안 "+ 보기 추가"는 작은 회색 윤곽선 버튼, 왼쪽 정렬 (키트 기본은 전체 너비 회색 면) */
713
+ .qe-group .qe-options > button.qe-add {
714
+ align-self: flex-start;
715
+ min-height: 0;
716
+ padding: 4px 11px;
717
+ border: 1px solid var(--eds-surface-border);
718
+ border-radius: 6px;
719
+ background: none;
720
+ color: var(--eds-secondary-main);
721
+ font-size: 13px;
722
+ line-height: 22px;
723
+ font-weight: var(--eds-fw-semibold);
485
724
  }
486
- .qe-optional,
487
- .qe-hint,
488
- .qe-count {
489
- color: var(--eds-text-secondary);
490
- font-weight: var(--eds-fw-medium);
491
- font-size: var(--eds-fs-caption);
725
+ @media (hover: hover) {
726
+ .qe-group .qe-options > button.qe-add:hover {
727
+ border-color: var(--ec-edit-hover-line);
728
+ background: var(--eds-action-hover);
729
+ }
492
730
  }
493
- .qe-count {
494
- align-self: flex-end;
731
+ .qe-group .qe-options > button.qe-add:focus-visible,
732
+ .qe-group .qe-options > button.qe-add:active {
733
+ background: color-mix(in srgb, var(--eds-secondary-main) 30%, transparent);
495
734
  }
496
- .qe-number {
497
- width: 120px;
735
+ .qe-group .qe-options > button.qe-add:disabled {
736
+ border-color: var(--eds-surface-border);
737
+ background: none;
738
+ color: var(--eds-action-disabled);
498
739
  }
499
- .qe-section {
500
- display: flex;
501
- flex-direction: column;
502
- gap: 8px;
503
- }
504
- .qe-options {
505
- display: flex;
506
- flex-direction: column;
507
- gap: var(--qz-list-gap);
740
+
741
+ /* ----- 퀴즈만: 연주님 최종 수정본 (편집 화면) ----- */
742
+ /* 카드 머리 "문항 N"은 회색 글자 */
743
+ .qe-card-head > strong {
744
+ color: var(--eds-text-secondary);
508
745
  }
509
- .qe-option {
510
- display: flex;
746
+ /* 유형 고르기: 회색 알약 버튼 (유형 아이콘 · 이름 · ∨). 누르면 아래에 목록(.qe-menu) */
747
+ .qe-card-head button.qe-type {
748
+ display: inline-flex;
511
749
  align-items: center;
512
750
  gap: 6px;
513
- border-radius: var(--eds-radius);
514
- transition: transform 150ms ease-in-out;
515
- }
516
- /* 끄는 줄은 손가락을 바로 따라오고(전환 없음) 위에 뜬다 */
517
- .qe-option[data-dragging] {
518
- position: relative;
519
- z-index: 1;
520
- transition: none;
521
- background: var(--eds-background-paper);
522
- box-shadow: var(--ec-shadow);
523
- }
524
- /* 끌기 손잡이: 터치에서 화면이 스크롤되지 않게 touch-action: none */
525
- .qe-handle {
526
- flex: none;
527
- width: 32px;
528
- min-height: 40px;
529
- padding: 0;
530
- border: 0;
531
- background: none;
532
- color: var(--qz-text-muted);
533
- font-size: 18px;
534
- cursor: grab;
535
- touch-action: none;
536
- }
537
- .qe-handle:hover {
538
- background: var(--qz-hover);
539
- color: var(--eds-text-secondary);
540
- }
541
- .qe-option[data-dragging] .qe-handle {
542
- cursor: grabbing;
543
- }
544
- .qe-option-no {
545
- flex: none;
546
- width: 24px;
547
- text-align: center;
548
- color: var(--qz-text-muted);
549
- font-weight: var(--eds-fw-bold);
550
- }
551
- .qe-option-text {
552
- flex: 1 1 0;
751
+ flex: 0 1 auto;
553
752
  min-width: 0;
554
- }
555
- /* 보기 줄의 정답 칸: radio · checkbox (누르는 영역 40px). 이름표는 목록 위 "정답" 열 머리 하나 */
556
- .qe-answer-col {
557
- flex: none;
558
- width: 40px;
559
- display: flex;
560
- align-items: center;
561
- justify-content: center;
562
- }
563
- .qe-answer {
564
- min-height: 40px;
565
- cursor: pointer;
566
- }
567
- /* 정답 표시: 고르면 보라색 채움 + 흰 체크 (단일은 원, 복수는 둥근 사각형) */
568
- .qe-answer input {
569
- appearance: none;
570
- -webkit-appearance: none;
571
- width: 22px;
572
- height: 22px;
573
- margin: 0;
574
- padding: 0;
575
- border: 2px solid var(--eds-action-disabled, #c4cad1);
576
- border-radius: 50%;
577
- background: var(--qz-surface) center / 14px no-repeat;
578
- cursor: pointer;
579
- }
580
- .qe-answer input[type='checkbox'] {
753
+ min-height: 0;
754
+ margin-right: auto;
755
+ padding: 5px 12px;
756
+ border: 0;
581
757
  border-radius: 6px;
582
- }
583
- .qe-answer input:checked {
584
- border-color: var(--qz-accent);
585
- background-color: var(--qz-accent);
586
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
587
- }
588
- .qe-answer input:focus-visible {
589
- outline: 2px solid var(--qz-accent);
590
- outline-offset: 2px;
591
- }
592
- /* 정답으로 고른 줄 (그룹은 그룹에 넣은 보기): 윤곽선 없는 칸이라 배경 없이 보라 밑줄로 (체크 원과 함께 알림) */
593
- .qe-option[data-correct] .qe-option-text {
594
- border-bottom-color: var(--qz-accent);
595
- }
596
- /* 그룹 분류 보기 줄의 정답 그룹 고르기: 보기 글 뒤, 삭제 버튼(40px) 앞 */
597
- .qe-answer-group {
598
- flex: 0 1 160px;
599
- width: auto;
600
- min-width: 0;
601
- }
602
- /* 저장하지 못한 정답 (정답을 고르지 않음 등): 정답 묶음을 오류 색으로 */
603
- .qe-section[data-role='answers'][data-error] > :last-child {
604
- outline: 1px solid var(--eds-error-main);
605
- outline-offset: 4px;
606
- border-radius: var(--eds-radius);
607
- background: var(--eds-error-background);
608
- }
609
- .qe-answer-error {
610
- margin: 0;
611
- color: var(--eds-error-main);
612
- font-size: var(--eds-fs-caption);
613
- font-weight: var(--eds-fw-bold);
614
- }
615
- /* 유형을 바꿔 정답이 초기화됨 */
616
- .qe-warning {
617
- margin: 0;
618
- padding: 8px 12px;
619
- border-radius: var(--eds-radius);
620
- background: var(--ec-warn-bg);
621
- color: var(--eds-warning-dark);
622
- font-size: var(--eds-fs-caption);
758
+ background: var(--qz-surface-muted);
759
+ color: var(--eds-text-primary);
760
+ font-size: 13px;
623
761
  font-weight: var(--eds-fw-semibold);
762
+ line-height: 22px;
763
+ cursor: pointer;
624
764
  }
625
- /* 최소 개수라 지울 수 없을 때 목록 아래 안내 */
626
- .qe-caption {
627
- margin: 0;
628
- color: var(--eds-text-tertiary);
629
- font-size: var(--eds-fs-caption);
630
- }
631
- .qe-add {
632
- align-self: stretch;
633
- border-style: dashed;
765
+ .qe-type svg {
766
+ flex: none;
634
767
  }
635
- /* 보기 · 그룹 추가: EDS Button contained · color inherit · medium (elice-design-system@7f3366a, button.ts).
636
- 회색 채움(라이트 bluegray200, hover bluegray300 · 다크 gray700, hover gray800), 14px / 600, 여백 8px 16px, 모서리 8px.
637
- 문항 추가(보라 점선)와 구분한다. 키트 기본 button의 min-height 44px는 풀어 40px로 */
638
- .qe-options > .qe-add {
639
- min-height: 0;
640
- padding: 8px 16px;
641
- border: 0;
642
- border-radius: 8px;
643
- background: var(--eds-color-bluegray-200);
644
- color: var(--eds-text-primary);
768
+ .qe-type-label {
769
+ min-width: 0;
770
+ overflow: hidden;
771
+ text-overflow: ellipsis;
772
+ white-space: nowrap;
645
773
  }
646
774
  @media (hover: hover) {
647
- .qe-options > .qe-add:hover {
648
- background: var(--eds-color-bluegray-300);
775
+ .qe-card-head button.qe-type:hover {
776
+ background: linear-gradient(var(--eds-action-hover), var(--eds-action-hover)), var(--qz-surface-muted);
649
777
  }
650
778
  }
651
- .qe-options > .qe-add:focus-visible,
652
- .qe-options > .qe-add:active {
653
- background: color-mix(in srgb, var(--eds-color-bluegray-300) 70%, white);
654
- }
655
- .qe-options > .qe-add:disabled {
656
- background: var(--eds-action-disabled-background);
657
- color: var(--eds-action-disabled);
658
- }
659
- :root[data-eds-theme='dark'] .qe-options > .qe-add {
660
- background: var(--eds-color-gray-700);
661
- }
662
- :root[data-eds-theme='dark'] .qe-options > .qe-add:hover {
663
- background: var(--eds-color-gray-800);
779
+ .qe-card-head button.qe-type:focus-visible,
780
+ .qe-card-head button.qe-type:active,
781
+ .qe-card-head button.qe-type[aria-expanded='true'] {
782
+ background: linear-gradient(
783
+ color-mix(in srgb, var(--eds-background-inverse) 8%, transparent),
784
+ color-mix(in srgb, var(--eds-background-inverse) 8%, transparent)
785
+ ),
786
+ var(--qz-surface-muted);
787
+ }
788
+ /* 유형 목록 (EDS Menu): body에 붙어 버튼 아래에 뜬다. 고른 항목은 회색 면 + 체크 */
789
+ .qe-menu {
790
+ position: fixed;
791
+ z-index: 30;
792
+ box-sizing: border-box;
793
+ max-height: min(320px, 100vh - 16px);
794
+ overflow-y: auto;
795
+ padding: 8px;
796
+ border: 1px solid var(--eds-divider);
797
+ border-radius: 8px;
798
+ background: var(--eds-background-paper);
799
+ color: var(--eds-text-primary);
800
+ box-shadow:
801
+ 0 3px 3px -2px #0003,
802
+ 0 3px 4px #00000024,
803
+ 0 1px 8px #0000001f;
664
804
  }
665
- /* 표시 옵션 (답안 순서 섞기 · 해설): 보기 · 정답과 줄로 나눔 */
666
- /* EDS Chip medium (elice-design-system@7f3366a, chip.spec.md): 높이 32px, 모서리 32px, 라벨 13px / 500, 아이콘 20px(왼쪽 8px, 라벨과 7px).
667
- 꺼짐 = outlined, 켜짐 = muted primary (배경 primary 15% + 흰색, 글자 primary dark · 다크 테마는 배경 primary 30% + 검정, 글자 primary light).
668
- 켜짐은 색 외에 체크 아이콘으로도 알린다. 체크박스는 화면에서만 숨김 */
669
- .qe-switch {
670
- position: relative;
671
- display: inline-flex;
805
+ .qe-menu-item {
806
+ display: flex;
672
807
  align-items: center;
673
- gap: 7px;
674
- height: 32px;
675
- padding: 0 11px 0 8px;
676
- border: 1px solid var(--eds-surface-border);
677
- border-radius: 32px;
678
- background: transparent;
679
- color: var(--eds-text-primary);
680
- font-size: 13px;
808
+ box-sizing: border-box;
809
+ height: 40px;
810
+ padding: 10px 8px;
811
+ border-radius: 4px;
812
+ font-size: 14px;
681
813
  font-weight: var(--eds-fw-medium);
682
- line-height: 1.38;
814
+ white-space: nowrap;
815
+ outline: none;
683
816
  cursor: pointer;
684
- user-select: none;
685
- }
686
- @media (hover: hover) {
687
- .qe-switch:hover {
688
- background: var(--eds-action-hover);
689
- }
690
817
  }
691
- .qe-switch input {
692
- position: absolute;
693
- width: 1px;
694
- height: 1px;
695
- opacity: 0;
696
- pointer-events: none;
697
- }
698
- .qe-chip-icon {
699
- display: inline-flex;
700
- }
701
- .qe-chip-on {
702
- display: none;
818
+ .qe-menu-item > svg {
819
+ flex: none;
820
+ box-sizing: content-box;
821
+ width: 20px;
822
+ height: 20px;
823
+ padding-right: 12px;
824
+ color: var(--eds-action-active);
703
825
  }
704
- .qe-switch:has(input:checked) .qe-chip-on {
826
+ .qe-menu-check {
705
827
  display: inline-flex;
828
+ margin-left: auto;
829
+ padding-left: 16px;
830
+ color: var(--qz-accent);
706
831
  }
707
- .qe-switch:has(input:checked) .qe-chip-off {
708
- display: none;
709
- }
710
- .qe-switch:has(input:checked) {
711
- border-color: transparent;
712
- background: color-mix(in srgb, var(--eds-primary-main) 15%, white);
713
- color: var(--eds-primary-dark);
714
- }
715
- :root[data-eds-theme='dark'] .qe-switch:has(input:checked) {
716
- background: color-mix(in srgb, var(--eds-primary-main) 30%, black);
717
- color: var(--eds-primary-light);
718
- }
719
- .qe-switch:has(input:focus-visible) {
720
- outline: 2px solid var(--qz-accent);
721
- outline-offset: 2px;
722
- }
723
- /* 라벨 없는 바로 쓰는 칸 (퀴즈 제목 · 안내, 질문 · 설명): 테두리 대신 밑줄, 초점이면 강조색 굵은 밑줄 + 옅은 배경 */
724
- .qe-inline {
725
- display: flex;
726
- flex-direction: column;
727
- gap: 4px;
728
- }
729
- .qe-inline-input {
730
- width: 100%;
731
- padding: 8px 12px;
732
- border: 0;
733
- border-bottom: 1px solid var(--qz-border);
734
- border-radius: var(--eds-radius) var(--eds-radius) 0 0;
735
- background: transparent;
736
- color: var(--eds-text-primary);
737
- line-height: 1.5;
738
- transition: background-color 120ms ease, box-shadow 120ms ease;
739
- }
740
- .qe-inline-input::placeholder {
741
- color: var(--eds-text-disabled);
742
- }
743
- /* 윤곽선 없는 입력 칸은 배경색을 쓰지 않는다 (hover는 밑줄 색, 초점은 굵은 보라 밑줄로 알림) */
744
- .qe-inline-input:hover {
745
- border-bottom-color: var(--eds-color-bluegray-400);
746
- }
747
- .qe-inline-input:focus {
748
- outline: none;
749
- border-bottom-color: transparent;
750
- box-shadow: inset 0 -2px 0 var(--qz-accent);
832
+ .qe-menu-check svg {
833
+ width: 18px;
834
+ height: 18px;
751
835
  }
752
- /* 비운 채 저장한 필수 칸 */
753
- .qe-inline-input[aria-invalid='true'] {
754
- border-bottom-color: transparent;
755
- box-shadow: inset 0 -2px 0 var(--eds-error-main);
836
+ .qe-menu-item:hover,
837
+ .qe-menu-item:focus-visible {
838
+ background: var(--eds-action-hover);
756
839
  }
757
- /* 여러 줄 칸: 글에 맞춰 높이가 는다 (field-sizing을 모르는 브라우저는 동작이 높이를 맞춤) */
758
- textarea.qe-inline-input {
759
- resize: none;
760
- overflow: hidden;
761
- min-height: 0;
762
- field-sizing: content;
840
+ .qe-menu-item[aria-selected='true'] {
841
+ background: var(--eds-action-selected);
763
842
  }
764
- .qe-inline-title .qe-inline-input {
765
- font-size: var(--eds-fs-h6);
766
- font-weight: var(--eds-fw-bold);
843
+ .qe-menu-item[aria-selected='true']:hover,
844
+ .qe-menu-item[aria-selected='true']:focus-visible {
845
+ background: color-mix(in srgb, var(--eds-action-selected) 100%, var(--eds-action-hover));
767
846
  }
768
- .qe-inline-question .qe-inline-input {
769
- font-size: var(--eds-fs-subtitle2);
770
- font-weight: var(--eds-fw-semibold);
847
+ .qe-menu-item:focus-visible {
848
+ box-shadow: inset 0 0 0 2px var(--qz-accent);
771
849
  }
772
- .qe-inline-body .qe-inline-input {
773
- font-size: var(--eds-fs-body2);
774
- color: var(--eds-text-secondary);
850
+ /* 손가락 화면: 목록 글자 16px (작은 글자를 눌러 확대되지 않게, 키트 모바일 규칙) */
851
+ @media (pointer: coarse) {
852
+ .qe-menu-item {
853
+ font-size: 16px;
854
+ }
775
855
  }
776
- /* 글자 수는 칸에 초점이 있을 때만 */
777
- .qe-inline {
856
+ /* 보기 칸 + 정답 표시: 정답으로 고른 줄 끝에 "정답" */
857
+ .qe-option-field {
778
858
  position: relative;
779
- }
780
- .qe-inline .qe-count {
781
- position: absolute;
782
- top: 100%;
783
- right: 0;
784
- margin-top: 2px;
785
- visibility: hidden;
786
- }
787
- .qe-inline:focus-within .qe-count {
788
- visibility: visible;
789
- }
790
- /* 퀴즈 제목 · 안내: 흰 카드. 문항 카드보다 여백(28px)과 모서리(16px)를 키우고 제목과 안내 사이에 구분선을 둔다.
791
- 입력 칸 밑줄은 평소에 없애고 (밑줄이 연달아 이어지는 번잡함), hover 때 연한 밑줄, 초점일 때 보라 굵은 밑줄로 알린다 */
792
- .qe-quiz-info {
793
- gap: 12px;
794
- padding: 28px;
795
- border: 0;
796
- border-radius: 16px;
797
- background: var(--qz-surface);
798
- }
799
- .qe-quiz-info .qe-inline-title {
800
- padding-bottom: 12px;
801
- border-bottom: 1px solid var(--eds-surface-border);
802
- }
803
- .qe-quiz-info .qe-inline-input {
804
- border-bottom-color: transparent;
805
- }
806
- .qe-quiz-info .qe-inline-input:hover:not(:focus) {
807
- border-bottom-color: var(--eds-color-bluegray-400);
808
- }
809
-
810
- /* 편집 화면: 화면 높이가 남으면 "초안에 반영" 바를 맨 아래 푸터에 두고, 내용이 길면 화면 아래에 붙여 둔다 */
811
- body.qe-page {
812
- min-height: 100vh;
813
- min-height: 100dvh;
814
- display: flex;
815
- flex-direction: column;
816
- padding: 24px 16px 0;
817
- }
818
- body.qe-page main {
819
- width: 100%;
820
- flex: 1;
821
- padding-bottom: 24px;
822
- }
823
- body.qe-page .ec-submitbar {
824
- max-width: none;
825
- margin: 0 -16px;
826
- padding: 12px max(16px, calc((100% - 720px) / 2));
827
- z-index: 8;
828
- }
829
-
830
- /* 편집 화면 전체 배경은 EDS background.neutral (카드는 paper 색 그대로, 아래 바도 같은 색) */
831
- :root:has(body.qe-page) {
832
- --ec-bg: var(--eds-background-neutral);
833
- }
834
-
835
- /* 보기 제목줄: 제목 왼쪽, 보기 순서 섞기 토글 오른쪽 */
836
- .qe-section-head {
837
- display: flex;
838
- align-items: center;
839
- justify-content: space-between;
840
- gap: 12px;
841
- }
842
- /* 필요할 때만 여는 칸 (설명 · 해설): 닫혀 있으면 글자 버튼만 */
843
- .qe-reveal {
844
- display: flex;
845
- flex-direction: column;
846
- align-items: flex-start;
847
- }
848
- .qe-reveal-body {
849
859
  display: flex;
850
- align-items: flex-start;
851
- gap: 4px;
852
- align-self: stretch;
853
- }
854
- .qe-reveal-body > .qe-inline {
855
- flex: 1;
860
+ flex: 1 1 0;
856
861
  min-width: 0;
857
862
  }
858
- .qe-reveal [hidden] {
859
- display: none;
860
- }
861
- /* EDS Button: variant outlined · color secondary · size small (elice-design-system@7f3366a, button.spec.md)
862
- 13px / 600, 여백 4px 11px, 줄높이 22px, 모서리 6px, 테두리 surface.border, hover 테두리 bluegray400 + action.hover 배경,
863
- 포커스 · 누름 배경 secondary 30%. 키트 기본 button의 min-height 44px는 이 버튼에서 풀어 준다 */
864
- .qe-reveal-button {
865
- min-height: 0;
866
- padding: 4px 11px;
867
- border: 1px solid var(--eds-surface-border);
868
- border-radius: 6px;
869
- background: transparent;
870
- color: var(--eds-secondary-main);
871
- font: inherit;
872
- font-size: 13px;
873
- font-weight: var(--eds-fw-semibold);
874
- line-height: 22px;
875
- cursor: pointer;
876
- }
877
- @media (hover: hover) {
878
- .qe-reveal-button:hover {
879
- border-color: var(--eds-color-bluegray-400);
880
- background: var(--eds-action-hover);
881
- }
882
- :root[data-eds-theme='dark'] .qe-reveal-button:hover {
883
- border-color: #ffffff80;
884
- }
885
- }
886
- .qe-reveal-button:focus-visible,
887
- .qe-reveal-button:active {
888
- background: color-mix(in srgb, var(--eds-secondary-main) 30%, transparent);
889
- }
890
-
891
- /* 끌기 손잡이: 데스크톱(마우스) 환경에서는 줄 밖 왼쪽 여백에 두어 자리를 차지하지 않고,
892
- 줄에 올리거나 초점이 있을 때만 보인다. 터치 환경과 좁은 화면에서는 줄 안에 항상 보인다 */
893
- @media (hover: hover) and (pointer: fine) and (min-width: 768px) {
894
- .qe-option {
895
- position: relative;
896
- }
897
- .qe-option .qe-handle {
898
- position: absolute;
899
- left: -22px;
900
- top: 50%;
901
- width: 20px;
902
- margin-top: -20px;
903
- opacity: 0;
904
- transition: opacity 120ms ease-in-out;
905
- }
906
- .qe-option:hover .qe-handle,
907
- .qe-option:focus-within .qe-handle,
908
- .qe-option[data-dragging] .qe-handle {
909
- opacity: 1;
910
- }
911
- }
912
-
913
- /* 해설: 닫혀 있으면 아이콘 + "해설 추가 +" 윤곽선 버튼, 열리면 카드 없이 머리줄(아이콘 · 이름 · 지우기) + 밑줄 입력 칸.
914
- "보기" 소제목줄(이름 왼쪽, 조작 오른쪽)과 같은 구조 */
915
- .qe-reveal-card .qe-reveal-button {
916
- display: inline-flex;
917
- align-items: center;
918
- gap: 6px;
919
- }
920
- .qe-reveal-head > svg {
921
- color: var(--qz-accent);
922
- }
923
- .qe-reveal-card .qe-reveal-body {
924
- flex-direction: column;
925
- align-items: stretch;
926
- gap: 4px;
927
- }
928
- .qe-reveal-head {
929
- display: flex;
930
- align-items: center;
931
- gap: 8px;
932
- font-size: var(--eds-fs-body2);
933
- }
934
- .qe-reveal-head strong {
935
- flex: none;
936
- font-weight: var(--eds-fw-bold);
937
- }
938
- /* 이름 옆 보조 글자: 글을 써도 남는 안내 (좁으면 말줄임) */
939
- .qe-reveal-hint {
940
- min-width: 0;
941
- overflow: hidden;
942
- color: var(--eds-text-secondary);
943
- font-size: var(--eds-fs-caption);
944
- font-weight: var(--eds-fw-medium);
945
- text-overflow: ellipsis;
863
+ .qe-correct-tag {
864
+ visibility: hidden;
865
+ position: absolute;
866
+ top: 50%;
867
+ right: 8px;
868
+ transform: translateY(-50%);
869
+ color: var(--eds-primary-main);
870
+ font-size: var(--eds-fs-body2);
871
+ font-weight: var(--eds-fw-semibold);
872
+ line-height: 1;
946
873
  white-space: nowrap;
874
+ pointer-events: none;
947
875
  }
948
- .qe-reveal-head [data-role='reveal-close'] {
949
- margin-left: auto;
876
+ :root[data-eds-theme='dark'] .qe-correct-tag {
877
+ color: var(--eds-primary-light);
950
878
  }
951
-
952
- /* 질문 칸 바로 아래 "설명 추가"는 칸에 붙여 둔다 */
953
- .qe-inline + .qe-reveal {
954
- margin-top: -8px;
879
+ .qe-option[data-correct] .qe-correct-tag {
880
+ visibility: visible;
955
881
  }
956
-
957
- /* EDS Snackbar (elice-design-system@7f3366a, snackbar.ts · SnackbarContent.tsx): 배경 background.snackbar, 글자 흰색(다크는 검정),
958
- 모서리 12px, 글자 500, 그림자 elevation 4, info 아이콘은 info.light. 위치는 편집 영역과 같은 가운데 아래, 하단 바 높이만큼 올린다 */
959
- .qe-snackbar {
960
- position: fixed;
961
- left: 50%;
962
- transform: translateX(-50%);
963
- bottom: 80px;
964
- z-index: 20;
965
- display: flex;
966
- align-items: center;
967
- max-width: min(480px, calc(100vw - 48px));
968
- padding: 6px 8px 6px 16px;
969
- border-radius: 12px;
970
- background: var(--eds-background-snackbar);
971
- color: var(--eds-common-white, #fff);
972
- font-size: var(--eds-fs-body2);
973
- font-weight: var(--eds-fw-medium);
974
- line-height: 1.43;
975
- box-shadow: var(--ec-shadow);
882
+ .qe-option-field:has(.qe-correct-tag) .qe-option-text {
883
+ padding-right: 52px;
976
884
  }
977
- :root[data-eds-theme='dark'] .qe-snackbar {
978
- color: #000;
885
+ /* 밑줄 칸: 왼쪽 여백 8px, 안내 글은 tertiary */
886
+ .qe-card .qe-inline-input {
887
+ padding: 8px 12px 8px 8px;
979
888
  }
980
- .qe-snackbar-icon {
981
- display: inline-flex;
982
- margin-right: 8px;
983
- color: var(--eds-info-light);
889
+ .qe-card .qe-inline-input::placeholder {
890
+ color: var(--eds-text-tertiary);
984
891
  }
985
- .qe-snackbar-text {
986
- flex: 1;
987
- padding: 8px 0;
892
+ /* 목록 끝 "+ 보기 추가"는 옅은 회색 면, 목록과 8px 띄움 */
893
+ .qe-options > button.qe-add {
894
+ margin-top: 8px;
895
+ background: var(--qz-surface-muted);
988
896
  }
989
- /* EDS Button text small · color inherit (13px / 600, 여백 5px 12px, 모서리 6px). 키트 기본 button의 min-height 44px를 푼다 */
990
- button.qe-snackbar-action {
991
- flex: none;
992
- min-height: 0;
993
- margin-left: 16px;
994
- padding: 5px 12px;
995
- border: 0;
996
- border-radius: 6px;
997
- background: transparent;
998
- color: inherit;
999
- font-size: 13px;
1000
- font-weight: var(--eds-fw-semibold);
1001
- line-height: 22px;
897
+ @media (hover: hover) {
898
+ .qe-options > button.qe-add:hover {
899
+ background: linear-gradient(var(--eds-action-hover), var(--eds-action-hover)), var(--qz-surface-muted);
900
+ }
1002
901
  }
1003
- button.qe-snackbar-action:hover {
1004
- background: rgb(255 255 255 / 0.12);
902
+ .qe-options > button.qe-add:focus-visible,
903
+ .qe-options > button.qe-add:active {
904
+ background: linear-gradient(
905
+ color-mix(in srgb, var(--eds-background-inverse) 8%, transparent),
906
+ color-mix(in srgb, var(--eds-background-inverse) 8%, transparent)
907
+ ),
908
+ var(--qz-surface-muted);
1005
909
  }
1006
- :root[data-eds-theme='dark'] button.qe-snackbar-action:hover {
1007
- background: rgb(0 0 0 / 0.08);
910
+ /* 열린 해설 · 입력란 힌트: 회색 상자 안에 */
911
+ .qe-reveal-card .qe-reveal-body {
912
+ padding: 16px;
913
+ border-radius: 12px;
914
+ background: var(--qz-surface-muted);
1008
915
  }
1009
- @media (max-width: 599.98px) {
1010
- .qe-snackbar {
1011
- left: 8px;
1012
- right: 8px;
1013
- transform: none;
1014
- max-width: none;
1015
- }
916
+ .qe-inline + .qe-reveal:has(.qe-reveal-body:not([hidden])) {
917
+ margin-top: 0;
1016
918
  }
1017
-
1018
- /* 편집 화면 아이콘 버튼 (삭제 ✕ · 휴지통 · ↑ ↓): EDS IconButton default · size small (elice-design-system@7f3366a, icon-button.ts · spec).
1019
- 아이콘 20px + 안쪽 여백 4px = 28px, 원형, 아이콘 색 action.active, hover 배경 action.hover,
1020
- 누름 · 포커스 배경 background.inverse 8% (다크 16%). 삭제 ✕도 빨강이 아닌 같은 중립색 (hover도 동일) */
1021
- .qe-card button.ec-icon-button,
1022
- .qe-card button.ec-icon-button.ec-danger {
1023
- width: 28px;
1024
- height: 28px;
1025
- min-height: 28px;
1026
- padding: 0;
1027
- border-radius: 50%;
1028
- background: none;
1029
- color: var(--eds-action-active);
919
+ .qe-groups > .qe-reveal {
920
+ margin-top: 4px;
1030
921
  }
1031
- .qe-card button.ec-icon-button svg {
1032
- width: 20px;
1033
- height: 20px;
922
+ /* 지울 수 없는 줄 · 그룹 · 상자의 ✕는 감춘다 (자리는 그대로) */
923
+ .qe-option [data-role='delete']:disabled,
924
+ .qe-group-head [data-role='group-delete']:disabled,
925
+ .qe-group-head [data-role='none-close']:disabled {
926
+ visibility: hidden;
1034
927
  }
1035
- @media (hover: hover) {
1036
- .qe-card button.ec-icon-button:hover,
1037
- .qe-card button.ec-icon-button.ec-danger:hover {
1038
- background: var(--eds-action-hover);
1039
- }
928
+ /* 작은 버튼의 누르는 영역을 둘레로 넓힌다 (모양은 그대로) */
929
+ .qe-card button.ec-icon-button,
930
+ .qe-card-head button.qe-type,
931
+ .qe-reveal-button,
932
+ .qe-options > .qe-add,
933
+ .qe-add-question {
934
+ position: relative;
1040
935
  }
1041
- .qe-card button.ec-icon-button:active,
1042
- .qe-card button.ec-icon-button:focus-visible,
1043
- .qe-card button.ec-icon-button.ec-danger:active,
1044
- .qe-card button.ec-icon-button.ec-danger:focus-visible {
1045
- background: color-mix(in srgb, var(--eds-background-inverse) 8%, transparent);
936
+ .qe-card button.ec-icon-button::after,
937
+ .qe-card-head button.qe-type::after,
938
+ .qe-reveal-button::after {
939
+ content: '';
940
+ position: absolute;
941
+ inset: -8px;
1046
942
  }
1047
- :root[data-eds-theme='dark'] .qe-card button.ec-icon-button:active,
1048
- :root[data-eds-theme='dark'] .qe-card button.ec-icon-button:focus-visible {
1049
- background: color-mix(in srgb, var(--eds-background-inverse) 16%, transparent);
943
+ .qe-card-head button.ec-icon-button::after {
944
+ inset: -7px;
1050
945
  }
1051
- .qe-card button.ec-icon-button:disabled,
1052
- .qe-card button.ec-icon-button.ec-danger:disabled {
1053
- background: none;
1054
- color: var(--eds-action-disabled);
946
+ .qe-card-head button.qe-type::after,
947
+ .qe-reveal-button::after {
948
+ inset: -6px;
1055
949
  }
1056
-
1057
- /* 문항 카드 머리의 삭제 · 순서 변경(↑ ↓): EDS IconButton outlined · size small (icon-button.ts)의 테두리 1px surface.border와 크기
1058
- (아이콘 20px + 안쪽 여백 4px + 테두리 2px = 30px)를 따르되, 모양은 원형 대신 사각형 + 모서리 4px (디자인 요청).
1059
- 보기 줄의 ✕는 테두리 없이 둔다 */
1060
- .qe-card-head button.ec-icon-button {
1061
- width: 30px;
1062
- height: 30px;
1063
- min-height: 30px;
1064
- border: 1px solid var(--eds-surface-border);
1065
- border-radius: 4px;
950
+ .qe-options > .qe-add::after,
951
+ .qe-add-question::after {
952
+ content: '';
953
+ position: absolute;
954
+ inset: -2px 0;
1066
955
  }
1067
956
 
1068
- /* "문항 N"과 유형 선택 사이: 머리줄 기본 간격(8px)에 4px을 더해 12px (좁은 화면은 4px + 4px) */
1069
- .qe-card-head > strong {
1070
- margin-right: 4px;
957
+ .qe-field {
958
+ display: flex;
959
+ flex-direction: column;
960
+ gap: 6px;
1071
961
  }
1072
-
1073
- /* 하단 바는 불투명하게: 전체 배경색(background.neutral, 투명도 4%)을 그대로 쓰면 뒤의 내용이 비쳐 겹쳐 보인다.
1074
- 같은 색을 background.default 위에 합성해 같은 색으로 보이되 비치지 않게 한다 */
1075
- body.qe-page .ec-submitbar {
1076
- background:
1077
- linear-gradient(var(--eds-background-neutral), var(--eds-background-neutral)),
1078
- var(--eds-background-default);
962
+ .qe-label {
963
+ font-weight: var(--eds-fw-bold);
964
+ display: flex;
965
+ align-items: center;
966
+ gap: 8px;
1079
967
  }
1080
-
1081
- /* 하단 "초안에 반영" 버튼: EDS Button contained · color secondary (elice-design-system@7f3366a, button.ts).
1082
- 배경 secondary.main, 글자 secondary.contrast-text, hover secondary.dark, 누름 · 포커스는 dark에 흰색 30%를 겹침 */
1083
- body.qe-page .ec-submitbar button.ec-primary {
1084
- background: var(--eds-secondary-main);
1085
- color: var(--eds-secondary-contrast-text);
968
+ .qe-required {
969
+ color: var(--eds-error-main);
1086
970
  }
1087
- @media (hover: hover) {
1088
- body.qe-page .ec-submitbar button.ec-primary:hover {
1089
- background: var(--eds-secondary-dark);
1090
- }
971
+ .qe-optional,
972
+ .qe-hint,
973
+ .qe-count {
974
+ color: var(--eds-text-secondary);
975
+ font-weight: var(--eds-fw-medium);
976
+ font-size: var(--eds-fs-caption);
1091
977
  }
1092
- body.qe-page .ec-submitbar button.ec-primary:focus-visible,
1093
- body.qe-page .ec-submitbar button.ec-primary:active {
1094
- background: color-mix(in srgb, var(--eds-secondary-dark) 70%, white);
978
+ .qe-count {
979
+ align-self: flex-end;
1095
980
  }
1096
- :root[data-eds-theme='dark'] body.qe-page .ec-submitbar button.ec-primary:focus-visible,
1097
- :root[data-eds-theme='dark'] body.qe-page .ec-submitbar button.ec-primary:active {
1098
- background: color-mix(in srgb, var(--eds-secondary-dark) 70%, black);
981
+ .qe-number {
982
+ width: 120px;
1099
983
  }
1100
- body.qe-page .ec-submitbar button.ec-primary:disabled {
1101
- background: var(--eds-action-disabled-background);
1102
- color: var(--eds-action-disabled);
984
+ /* 그룹 분류 보기 줄의 정답 그룹 고르기: 보기 글 뒤, 삭제 버튼(40px) 앞 */
985
+ .qe-answer-group {
986
+ flex: 0 1 160px;
987
+ width: auto;
988
+ min-width: 0;
1103
989
  }
1104
-
1105
- /* 정답 · 보기 제목 옆 안내: 제목과 같은 줄, 보조 글자 12px (caption). 좁으면 말줄임 */
1106
- .qe-hint-inline {
990
+ /* 저장하지 못한 정답 (정답을 고르지 않음 등): 정답 묶음을 오류 색으로 */
991
+ .qe-section[data-role='answers'][data-error] > :last-child {
992
+ outline: 1px solid var(--eds-error-main);
993
+ outline-offset: 4px;
994
+ border-radius: var(--eds-radius);
995
+ background: var(--eds-error-background);
996
+ }
997
+ .qe-answer-error {
998
+ margin: 0;
999
+ color: var(--eds-error-main);
1000
+ font-size: var(--eds-fs-caption);
1001
+ font-weight: var(--eds-fw-bold);
1002
+ }
1003
+ /* 유형을 바꿔 정답이 초기화됨 */
1004
+ .qe-warning {
1005
+ margin: 0;
1006
+ padding: 8px 12px;
1007
+ border-radius: var(--eds-radius);
1008
+ background: var(--ec-warn-bg);
1009
+ color: var(--eds-warning-dark);
1010
+ font-size: var(--eds-fs-caption);
1011
+ font-weight: var(--eds-fw-semibold);
1012
+ }
1013
+ /* 최소 개수라 지울 수 없을 때 목록 아래 안내 */
1014
+ .qe-caption {
1015
+ margin: 0;
1016
+ color: var(--eds-text-tertiary);
1017
+ font-size: var(--eds-fs-caption);
1018
+ }
1019
+ /* "설명 추가"처럼 머리줄 없이 여는 칸: 열리면 밑줄 칸 옆에 지우기 ✕ (해설처럼 머리줄이 있는 칸은 키트 모양 그대로) */
1020
+ .qe-reveal:not(.qe-reveal-card) > .qe-reveal-body {
1021
+ flex-direction: row;
1022
+ align-items: flex-start;
1023
+ }
1024
+ .qe-reveal-body > .qe-inline {
1107
1025
  flex: 1;
1108
1026
  min-width: 0;
1109
- overflow: hidden;
1110
- color: var(--eds-text-secondary);
1111
- font-size: var(--eds-fs-caption);
1112
- font-weight: var(--eds-fw-medium);
1113
- text-overflow: ellipsis;
1114
- white-space: nowrap;
1115
1027
  }
1116
1028
 
1117
1029
  /* 그룹 분류 편집판 (그룹별 상자): 그룹마다 상자, 그 안에 보기. 왼쪽 여백은 끌기 손잡이 자리 */
@@ -1169,3 +1081,253 @@ body.qe-page .ec-submitbar button.ec-primary:disabled {
1169
1081
  outline-offset: 4px;
1170
1082
  border-radius: 8px;
1171
1083
  }
1084
+
1085
+ /* ── 연주님 최종 수정본 (퀴즈 최종) ── */
1086
+ /* 문제 제목은 semibold */
1087
+ .qz-question-title {
1088
+ font-weight: var(--eds-fw-semibold);
1089
+ }
1090
+ /* 지문 · 해설 속 그림 (편집 화면에서 올린 그림 · zip 안 img/) */
1091
+ .qz-image {
1092
+ display: block;
1093
+ max-width: 100%;
1094
+ height: auto;
1095
+ margin: 0 auto 12px;
1096
+ border-radius: var(--qz-radius-card);
1097
+ }
1098
+ /* 그림을 찾지 못하면 설명 글만 */
1099
+ .qz-image-missing {
1100
+ color: var(--eds-text-tertiary);
1101
+ }
1102
+ .qz-markdown pre code,
1103
+ .qe-wys pre code {
1104
+ padding: 0;
1105
+ background: none;
1106
+ }
1107
+ /* 3줄 이상 코드 블록: 왼쪽에 줄 번호 (data-lines) */
1108
+ .qz-markdown pre.qz-lines,
1109
+ .qe-wys pre.qz-lines {
1110
+ position: relative;
1111
+ padding-left: 48px;
1112
+ white-space: pre;
1113
+ overflow-x: auto;
1114
+ }
1115
+ .qz-markdown pre.qz-lines::before,
1116
+ .qe-wys pre.qz-lines::before {
1117
+ content: attr(data-lines);
1118
+ position: absolute;
1119
+ top: 12px;
1120
+ left: 0;
1121
+ width: 32px;
1122
+ color: var(--eds-text-tertiary);
1123
+ text-align: right;
1124
+ white-space: pre;
1125
+ user-select: none;
1126
+ pointer-events: none;
1127
+ }
1128
+ .qe-wys pre.qz-lines::before {
1129
+ top: 8px;
1130
+ }
1131
+
1132
+ /* 지문 · 해설 편집 칸 (core/rich-text.js): 글 칸 · 그림 칸 묶음 전체에 밑줄 하나 */
1133
+ .qe-blocks {
1134
+ gap: 0;
1135
+ border-bottom: 1px solid var(--ec-border);
1136
+ border-radius: var(--eds-radius) var(--eds-radius) 0 0;
1137
+ transition: box-shadow 0.12s;
1138
+ }
1139
+ .qe-blocks:hover {
1140
+ border-bottom-color: var(--ec-edit-hover-line);
1141
+ }
1142
+ .qe-blocks:focus-within {
1143
+ border-bottom-color: transparent;
1144
+ box-shadow: inset 0 -2px 0 var(--ec-accent);
1145
+ }
1146
+ .qe-blocks-list {
1147
+ display: flex;
1148
+ flex-direction: column;
1149
+ gap: 4px;
1150
+ }
1151
+ /* 그림 사이 빈 글 칸은 초점이 없을 때 얇게 */
1152
+ .qe-blocks-list > .qe-wys[data-empty]:not(:only-child):not(:focus) {
1153
+ min-height: 0;
1154
+ padding-block: 2px;
1155
+ }
1156
+ .qe-wys {
1157
+ position: relative;
1158
+ display: block;
1159
+ width: 100%;
1160
+ min-height: 37px;
1161
+ color: var(--eds-text-secondary);
1162
+ font-size: var(--eds-fs-body2);
1163
+ line-height: 1.5;
1164
+ white-space: pre-wrap;
1165
+ word-break: break-word;
1166
+ outline: none;
1167
+ }
1168
+ .qe-wys > :last-child {
1169
+ margin-bottom: 0;
1170
+ }
1171
+ .qe-wys p,
1172
+ .qe-wys ul,
1173
+ .qe-wys ol {
1174
+ margin: 0 0 6px;
1175
+ }
1176
+ .qe-wys ul,
1177
+ .qe-wys ol {
1178
+ padding-left: 24px;
1179
+ }
1180
+ .qe-wys pre {
1181
+ margin: 0 0 6px;
1182
+ padding: 8px 12px;
1183
+ white-space: pre;
1184
+ overflow-x: auto;
1185
+ }
1186
+ .qe-wys code {
1187
+ font-family: ui-monospace, Menlo, monospace;
1188
+ }
1189
+ .qe-wys code,
1190
+ .qe-wys pre {
1191
+ background: var(--eds-background-paper, #fff);
1192
+ box-shadow: inset 0 0 0 1px var(--qz-border);
1193
+ }
1194
+ .qe-wys pre code {
1195
+ box-shadow: none;
1196
+ }
1197
+ .qe-wys img {
1198
+ max-width: 100%;
1199
+ }
1200
+ .qe-wys[data-empty][data-placeholder]:not([data-placeholder=''])::before {
1201
+ content: attr(data-placeholder);
1202
+ position: absolute;
1203
+ top: 8px;
1204
+ left: 8px;
1205
+ color: var(--eds-text-tertiary);
1206
+ pointer-events: none;
1207
+ }
1208
+ /* 올린 그림 칸: 흰 바탕 가운데, 오른쪽 위 지우기 */
1209
+ .qe-block-image {
1210
+ position: relative;
1211
+ display: flex;
1212
+ justify-content: center;
1213
+ margin: 0;
1214
+ padding: 12px;
1215
+ border-radius: 12px;
1216
+ background: var(--eds-background-paper, #fff);
1217
+ }
1218
+ .qe-block-image img {
1219
+ display: block;
1220
+ max-width: 100%;
1221
+ max-height: 280px;
1222
+ border-radius: 8px;
1223
+ }
1224
+ .qe-block-remove {
1225
+ position: absolute;
1226
+ top: 8px;
1227
+ right: 8px;
1228
+ display: flex;
1229
+ align-items: center;
1230
+ justify-content: center;
1231
+ width: 28px;
1232
+ min-width: 0;
1233
+ height: 28px;
1234
+ min-height: 0;
1235
+ padding: 0;
1236
+ border: 0;
1237
+ border-radius: 50%;
1238
+ background: color-mix(in srgb, var(--eds-text-primary) 70%, transparent);
1239
+ color: #fff;
1240
+ cursor: pointer;
1241
+ }
1242
+ .qe-block-remove::after {
1243
+ content: '';
1244
+ position: absolute;
1245
+ inset: -8px;
1246
+ }
1247
+ .qe-block-remove:hover {
1248
+ background: var(--eds-text-primary);
1249
+ }
1250
+ .qe-block-remove:focus-visible {
1251
+ outline: 2px solid var(--qz-accent);
1252
+ outline-offset: 2px;
1253
+ }
1254
+ .qe-block-remove svg {
1255
+ width: 16px;
1256
+ height: 16px;
1257
+ }
1258
+
1259
+ /* 서식 도구: 칸에 초점이 있을 때 카드 아래 가장자리에 걸쳐 뜸 (그림 파일을 고르는 동안은 data-hold로 유지) */
1260
+ .qe-reveal-card .qe-reveal-body {
1261
+ position: relative;
1262
+ }
1263
+ .qe-md {
1264
+ position: absolute;
1265
+ top: calc(100% - 12px);
1266
+ left: 16px;
1267
+ z-index: 6;
1268
+ display: flex;
1269
+ align-items: center;
1270
+ gap: 2px;
1271
+ width: max-content;
1272
+ max-width: calc(100% - 32px);
1273
+ padding: 2px 6px;
1274
+ border-radius: 10px;
1275
+ background: var(--eds-background-paper, #fff);
1276
+ box-shadow: var(--ec-shadow);
1277
+ opacity: 0;
1278
+ visibility: hidden;
1279
+ transition:
1280
+ opacity 0.12s,
1281
+ visibility 0s linear 0.12s;
1282
+ }
1283
+ .qe-reveal-body:focus-within .qe-md,
1284
+ .qe-md[data-hold] {
1285
+ opacity: 1;
1286
+ visibility: visible;
1287
+ transition: opacity 0.12s;
1288
+ }
1289
+ .qe-md-btn {
1290
+ position: relative;
1291
+ display: inline-flex;
1292
+ align-items: center;
1293
+ justify-content: center;
1294
+ min-width: 32px;
1295
+ height: 32px;
1296
+ min-height: 0;
1297
+ padding: 0 8px;
1298
+ border: 0;
1299
+ border-radius: 6px;
1300
+ background: none;
1301
+ color: var(--eds-text-secondary);
1302
+ font: inherit;
1303
+ font-size: var(--eds-fs-body2);
1304
+ cursor: pointer;
1305
+ }
1306
+ /* 누르는 자리를 조금 넓게 */
1307
+ .qe-md-btn::after {
1308
+ content: '';
1309
+ position: absolute;
1310
+ inset: -6px -2px;
1311
+ }
1312
+ .qe-md-btn:hover:not(:disabled) {
1313
+ background: var(--eds-action-hover);
1314
+ color: var(--eds-text-primary);
1315
+ }
1316
+ .qe-md-btn:focus-visible {
1317
+ outline: 2px solid var(--qz-accent);
1318
+ outline-offset: -2px;
1319
+ }
1320
+ .qe-md-btn:disabled {
1321
+ opacity: 0.4;
1322
+ cursor: default;
1323
+ }
1324
+ .qe-md-btn[aria-pressed='true'] {
1325
+ background: var(--eds-action-selected, var(--eds-action-hover));
1326
+ color: var(--qz-accent);
1327
+ }
1328
+ .qe-md-sep {
1329
+ width: 1px;
1330
+ height: 18px;
1331
+ margin: 0 4px;
1332
+ background: var(--qz-border);
1333
+ }