/* 오류 읽기 30 — keywords.css의 시리즈 틀 위에 가짜 오류 화면과 보고서 모양만 더한다 */
.er {
  --er-ink: #1a1433; --er-line: rgba(52, 36, 110, 0.18); --er-soft: #f4f2fa;
  --er-red: #c5221f; --er-red-t: #fdeeee; --er-ok: #0a7a6c;
  --er-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.er-mono { font-family: var(--er-mono); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; }

/* 머리 그림의 작업대가 왼쪽 40% 가까이 들어와 글 폭을 좁힌다 */
.er .kw-hero__copy { max-width: 390px; }
.er .kw-hero::before { background: linear-gradient(90deg, rgba(28, 18, 86, 0.94) 0%, rgba(28, 18, 86, 0.8) 32%, rgba(28, 18, 86, 0.1) 52%, rgba(28, 18, 86, 0) 100%); }

/* ── 목록 ── */
.er .er-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.er .er-card { min-height: 124px; }
.er-card__icon {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: 6px; border-radius: 6px;
  background: var(--kw-t); color: var(--kw-c); font-size: 17px;
}
.er .er-card .kw-card__n { position: absolute; top: 12px; right: 12px; }
.er .er-card.is-known .kw-card__n { display: none; }
.er .er-card.is-known .er-card__icon { background: #fff; }
.er-card__en {
  margin-top: 2px; font-family: var(--er-mono); font-size: 11.5px; line-height: 1.4; font-weight: 600;
  color: var(--kw-muted); overflow-wrap: anywhere;
}

.er-stage {
  position: relative;
  padding: 14px;
  border: 1px solid var(--er-line); border-radius: 8px;
  background-color: #f7f5fc;
  background-image: radial-gradient(rgba(75, 47, 160, 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
  overflow: hidden;
}
.er-stage--quiz { margin-top: 12px; background-color: #fff; }
.er-host { display: flex; flex-direction: column; gap: 10px; min-width: 0; color: var(--er-ink); font-size: 14px; }

/* ── 누르면 풀이가 뜨는 부분 ── */
.er-mark {
  display: inline; margin: 0; padding: 0 2px;
  border: 0; border-bottom: 2px dashed #d39b00; border-radius: 3px;
  background: rgba(255, 205, 64, 0.32); color: inherit;
  font: inherit; line-height: inherit; letter-spacing: inherit; text-align: inherit;
  cursor: pointer; overflow-wrap: anywhere;
}
.er-mark:hover { background: rgba(255, 205, 64, 0.55); }
.er-mark:focus-visible { outline: 2px solid #4b2fa0; outline-offset: 1px; }
.er-mark.is-read { border-bottom-style: solid; border-bottom-color: #0d8577; background: rgba(13, 133, 119, 0.16); }
.er .er-mark.is-on { background: #ffd66b; color: #1a1433; border-bottom-color: #b26b12; }
.er-term .er-mark.is-read, .er-code .er-mark.is-read { background: rgba(94, 234, 212, 0.22); border-bottom-color: #5eead4; }
.er-mark--sample { cursor: default; }

.er-explain {
  padding: 9px 12px; border: 1px solid #f0dc9c; border-radius: 6px; background: #fffaea;
}
.er-explain p { margin: 0; font-size: 15px; line-height: 1.5; font-weight: 700; color: var(--er-ink); }
.er-explain__hint { color: #6a5520 !important; }
.er-explain__hint i { margin-right: 4px; }
.er-explain__pick code {
  margin-right: 4px; padding: 1px 6px; border-radius: 4px; background: #ffd66b; color: #1a1433;
  font-family: var(--er-mono); font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere;
}

/* ── 브라우저 창 ── */
.er-win {
  width: 100%; border: 1px solid #cfd3dc; border-radius: 8px; background: #fff; overflow: hidden;
  box-shadow: 0 12px 24px -18px rgba(26, 20, 51, 0.55);
}
.er-win__bar { display: flex; align-items: center; gap: 8px; padding: 7px 8px; background: #eceef3; border-bottom: 1px solid #dadde5; }
.er-win__dots { display: flex; gap: 5px; flex: none; }
.er-win__dots i { width: 9px; height: 9px; border-radius: 50%; background: #f87171; }
.er-win__dots i:nth-child(2) { background: #fbbf24; }
.er-win__dots i:nth-child(3) { background: #34d399; }
.er-win__url {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 6px; background: #fff; color: #5f6368;
  font-family: var(--er-mono); font-size: 12px;
}
.er-win__url > i { flex: none; font-size: 10px; color: #80868b; }
.er-win__addr { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.er-win__url--edit { padding: 2px 2px 2px 8px; margin: 0; }
.er-win__host { flex: none; color: #80868b; }
.er-win__url--edit input {
  flex: 1; min-width: 0; height: 28px; padding: 0 6px; border: 1px solid #c7cbe0; border-radius: 4px;
  background: #fffdf2; color: #1a1433; font-size: 13px; white-space: nowrap;
}
.er-win__url--edit input:focus { outline: 2px solid #4b2fa0; outline-offset: 0; }
.er-win__url--edit button {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 4px; background: #4b2fa0; color: #fff; cursor: pointer;
}
.er-win__page { padding: 14px; min-height: 120px; font-size: 14px; }
.er-win__page.is-blink { animation: er-blink 0.5s ease; }
@keyframes er-blink { 0% { opacity: 0.15; } 100% { opacity: 1; } }
.er-win--phone, .er-win--tablet { margin: 0 auto; border: 6px solid #1d1840; border-radius: 18px; }
.er-win--phone { max-width: 270px; }
.er-win--tablet { max-width: 380px; border-radius: 14px; }
.er-win--phone .er-win__bar, .er-win--tablet .er-win__bar { background: #f3f3f6; }
.er-blank { height: 150px; background: #fff; }

.er-pagehead { margin: 0 0 10px; font-size: 16px; font-weight: 900; color: #6447d1; }
.er-pagehead.is-new { color: #0d8577; }
.er-pagehead--row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--er-ink); }
.er-acct { padding: 3px 8px; border-radius: 5px; background: var(--er-soft); color: #4a4362; font-size: 12px; font-weight: 700; }
.er-acct--time b { color: #b4232f; }
.er-pagebtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 14px; border: 2px solid #4b2fa0; border-radius: 6px;
  background: #4b2fa0; color: #fff; font-size: 14px; font-weight: 800; cursor: pointer;
}
.er-pagebtn--ghost { background: #fff; color: #4b2fa0; }
.er-pagebtn:disabled { opacity: 0.55; cursor: progress; }
.er-fakeinput { margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--er-line); border-radius: 6px; color: #4a4362; font-size: 13.5px; }
.er-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.er-note { margin: 0; font-size: 13px; font-weight: 700; color: #6a6384; text-align: center; }
.er-note--left { text-align: left; }
.er-okmsg { margin: 0; color: var(--er-ok); font-size: 14.5px; font-weight: 800; }
.er-okmsg i { margin-right: 4px; }
.er-tip { margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--er-soft); font-size: 13px; font-weight: 700; color: #4a4362; line-height: 1.5; }
.er-tip code { font-family: var(--er-mono); background: #fff; padding: 0 4px; border-radius: 3px; }

.er-http { padding: 14px 6px; text-align: center; }
.er-http strong { display: block; font-size: 22px; line-height: 1.25; font-weight: 900; color: #202124; font-family: var(--er-mono); }
.er-http p { margin: 8px 0 0; color: #5f6368; }
.er-http--sm { padding: 8px 4px; }
.er-http--sm strong { font-size: 17px; }
.er-http--left { text-align: left; }
.er-http--left strong { color: var(--er-red); }

/* ── 개발자 도구 ── */
.er-dev { border: 1px solid #cfd3dc; border-radius: 8px; background: #fff; overflow: hidden; }
.er-dev[hidden] { display: none; }
.er-dev__tabs { display: flex; gap: 2px; padding: 0 8px; background: #f1f3f4; border-bottom: 1px solid #dadce0; font-size: 12px; color: #5f6368; }
.er-dev__tabs span { padding: 6px 8px; border-bottom: 2px solid transparent; }
.er-dev__tabs .is-on { color: #1a73e8; border-bottom-color: #1a73e8; font-weight: 700; }
.er-dev__body { max-height: 220px; overflow: auto; }
.er-dev__empty { margin: 0; padding: 10px 12px; font-size: 12.5px; color: #80868b; }
.er-line { display: flex; gap: 8px; align-items: flex-start; padding: 6px 10px; border-bottom: 1px solid #f1f3f4; color: #202124; }
.er-line > i { flex: none; margin-top: 3px; font-size: 12px; }
.er-line > span { min-width: 0; }
.er-line--err { background: var(--er-red-t); color: #a50e0e; border-bottom-color: #f9d6d5; }
.er-line--err > i { color: #d93025; }
.er-line--warn { background: #fef7e0; color: #5c3c00; }
.er-line--warn > i { color: #e37400; }
.er-line--info > i { color: #188038; }
.er-line--log { color: #5f6368; }
.er-line--log > i { color: #9aa0a6; }

.er-net { font-size: 12px; }
.er-net__row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 8px; padding: 5px 10px; border-bottom: 1px solid #f1f3f4; color: #202124; }
.er-net__row > span { min-width: 0; }
.er-net__row--head { background: #f8f9fa; color: #5f6368; font-weight: 700; }
.er-net__row.is-err { color: #d93025; background: var(--er-red-t); }
.er-net__row.is-wait { color: #5f6368; font-style: italic; }
.er-net__row.is-cache { color: #5f6368; }
.er-net__row.is-ok { color: #188038; }
.er-net__foot { padding: 6px 10px; background: #f8f9fa; color: #5f6368; }

/* ── 터미널·코드 ── */
.er-term { border-radius: 8px; overflow: hidden; background: #14112b; box-shadow: 0 12px 24px -18px rgba(20, 17, 43, 0.9); }
.er-term__bar { display: flex; align-items: center; gap: 5px; padding: 6px 10px; background: #221d45; }
.er-term__bar i { width: 8px; height: 8px; border-radius: 50%; background: #4a4470; }
.er-term__bar span { margin-left: 6px; font-size: 11.5px; font-weight: 700; color: #a8a2c8; }
.er-term__body { margin: 0; padding: 10px 12px; max-height: 240px; overflow: auto; color: #e6e3f5; }
.t-err { color: #ff8f8f; font-weight: 700; }
.t-ok { color: #6ee7b7; font-weight: 700; }
.t-dim { color: #9d97b8; }

.er-code { border-radius: 8px; overflow: hidden; background: #1e1a3d; color: #e6e3f5; }
.er-code__file { padding: 6px 10px; background: #2a2552; color: #c9c3ea; font-size: 12px; font-weight: 700; }
.er-code__lines { margin: 0; padding: 8px 10px 8px 42px; }
.er-code__lines li { padding: 1px 4px; border-radius: 3px; }
.er-code__lines li::marker { color: #7d76a3; font-family: var(--er-mono); font-size: 11.5px; }
.er-code__lines li.is-hot { background: rgba(255, 107, 107, 0.2); }
.er-code b { color: #6ee7b7; font-weight: 700; }
.er-code i { color: #9d97b8; font-style: normal; }
.er-code u { text-decoration: underline wavy #ff8f8f; text-underline-offset: 3px; }
.er-gap { display: inline-block; width: 18px; height: 1.2em; vertical-align: middle; margin-left: 4px; border: 1px dashed #ff8f8f; border-radius: 3px; background: rgba(255, 107, 107, 0.25); }
.er-gap--line { width: 150px; max-width: 70%; }
.er-received .er-gap { border-color: #d93025; background: rgba(217, 48, 37, 0.15); }
.er-space { display: inline-block; padding: 0 2px; border-radius: 3px; background: rgba(255, 107, 107, 0.4); color: #ffd1d1; }
.er-peek { padding: 6px 10px; border-radius: 6px; background: #fff; border: 1px solid var(--er-line); font-family: var(--er-mono); font-size: 12.5px; }
.er-peek code { color: #b4232f; font-weight: 700; }
.er-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }

/* ── 단추 ── */
.er-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.er-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border: 1px solid #4b2fa0; border-radius: 6px;
  background: #fff; color: #4b2fa0; font-size: 14px; font-weight: 800; cursor: pointer;
  transition: background 0.15s;
}
.er-act:hover:not(:disabled) { background: #efebfb; }
.er-act:focus-visible { outline: 3px solid rgba(75, 47, 160, 0.4); outline-offset: 2px; }
.er-act:disabled { opacity: 0.5; cursor: default; }
.er-act--warn { margin-top: 8px; border-color: #b4232f; color: #b4232f; }
.er-act--warn:hover:not(:disabled) { background: #fdeaec; }
.er-seg { display: flex; border: 1px solid var(--er-line); border-radius: 6px; overflow: hidden; background: #fff; }
.er-seg button { flex: 1; min-height: 38px; padding: 0 10px; border: 0; border-left: 1px solid var(--er-line); background: transparent; color: var(--er-ink); font-size: 13.5px; font-weight: 800; cursor: pointer; }
.er-seg button:first-child { border-left: 0; }
.er-seg button[aria-pressed="true"] { background: #4b2fa0; color: #fff; }
.er-seg button:focus-visible { outline: 3px solid rgba(75, 47, 160, 0.45); outline-offset: -3px; }

.er-switches { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; }
.er-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; }
.er-switch { position: relative; flex: none; width: 46px; height: 26px; padding: 0; border: 0; border-radius: 13px; background: #c9c4da; cursor: pointer; transition: background 0.2s; }
.er-switch > span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.er-switch[aria-checked="true"] { background: #0d8577; }
.er-switch[aria-checked="true"] > span { transform: translateX(20px); }
.er-switch:focus-visible { outline: 3px solid rgba(13, 133, 119, 0.45); outline-offset: 2px; }
.er-switch--sm[aria-checked="true"] { background: var(--kw-c); }

/* ── 화면 속 부품 ── */
.er-loading { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; color: #4a4362; font-weight: 700; }
.er-loading small { font-size: 12.5px; color: #80868b; font-variant-numeric: tabular-nums; }
/* 로딩 고리는 배우는 대상이라 동작 줄이기에서도 멈추지 않는다 */
.er-spin { width: 30px; height: 30px; border: 4px solid #ddd8ec; border-top-color: #4b2fa0; border-radius: 50%; animation: er-rot 0.8s linear infinite; }
@keyframes er-rot { to { transform: rotate(360deg); } }
.er-bar { height: 8px; border-radius: 4px; background: #ece8f7; overflow: hidden; margin-top: 8px; }
.er-bar > span { display: block; height: 100%; width: 0; background: #4b2fa0; }
.er-bar.is-bad > span { background: #d93025; }
.er-photo { margin: 0; }
.er-photo__broken {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 120px; border: 1px dashed #b8b3cb; border-radius: 4px; background: #fafafa; color: #9aa0a6;
}
.er-photo__broken i { font-size: 28px; }
.er-photo__broken small { font-family: var(--er-mono); font-size: 11.5px; }
.er-photo__img { display: block; height: 120px; border-radius: 4px; background: linear-gradient(180deg, #93c5fd 0 45%, #86efac 45% 100%); position: relative; }
.er-photo__img::after { content: ""; position: absolute; left: 18%; top: 22%; width: 26px; height: 26px; border-radius: 50%; background: #fde68a; }
.er-photo figcaption { margin-top: 6px; font-size: 12.5px; color: #5f6368; }
.er-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.er-table th, .er-table td { padding: 6px 8px; border-bottom: 1px solid #e8e6f0; text-align: left; overflow-wrap: anywhere; }
.er-table th { background: var(--er-soft); font-weight: 800; }
.er-status { margin: 8px 0 0; font-size: 12.5px; color: #5f6368; }
.er-status code { font-family: var(--er-mono); }
.er-menu { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.er-menu li { padding: 6px 10px; border-radius: 5px; background: var(--er-soft); font-weight: 700; }
.er-menu--list { margin-bottom: 10px; }
.er-menu--list small { color: #b26b12; font-weight: 800; }
.er-input { min-height: 34px; min-width: 0; padding: 0 8px; border: 1px solid #c7cbe0; border-radius: 6px; font: inherit; font-size: 14px; color: var(--er-ink); background: #fff; }
.er-input[type="number"] { width: 70px; }
.er-row .er-input { flex: 1 1 140px; }
.er-textarea { display: block; width: 100%; margin-bottom: 8px; padding: 8px 10px; border: 1px solid #c7cbe0; border-radius: 6px; font: inherit; font-size: 13.5px; resize: vertical; }
.er-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.er-form label { display: grid; gap: 3px; font-size: 12.5px; font-weight: 800; color: #4a4362; }
.er-form--col { flex-direction: column; align-items: stretch; padding: 12px; border: 1px solid var(--er-line); border-radius: 8px; background: #fff; }
.er-form--col .er-pagebtn { align-self: flex-start; }
.er-fielderr { margin: -2px 0 0; font-size: 13px; font-weight: 700; color: #b4232f; }
.er-fielderr[hidden] { display: none; }
.er-mini { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--er-line); border-radius: 8px; background: #fff; }
.er-file { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 6px; background: var(--er-soft); }
.er-file i { color: #6447d1; }
.er-received { border: 1px solid var(--er-line); border-radius: 8px; background: #fff; overflow: hidden; }
.er-received__label { display: block; padding: 6px 10px; background: var(--er-soft); font-size: 12px; font-weight: 800; color: #4a4362; }
.er-received pre { margin: 0; padding: 10px; }
.er-received b { color: var(--er-ok); }
.er-received .t-err { color: #b4232f; }

.er-modalwrap { position: relative; }
.er-modal { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; border-radius: 8px; background: rgba(26, 20, 51, 0.55); }
.er-modal[hidden] { display: none; }
.er-modal__box { display: grid; gap: 12px; max-width: 280px; padding: 16px; border-radius: 8px; background: #fff; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.55); }
.er-modal__box strong { font-size: 14px; color: var(--er-ink); }

.er-cors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, 0.9fr) minmax(0, 1fr); gap: 6px; align-items: center; }
.er-node { display: grid; justify-items: center; gap: 3px; padding: 10px 6px; border: 1px solid var(--er-line); border-radius: 8px; background: #fff; text-align: center; }
.er-node > i { font-size: 20px; color: #6447d1; }
.er-node strong { font-size: 13.5px; }
.er-node code { font-family: var(--er-mono); font-size: 11px; color: #4a4362; overflow-wrap: anywhere; }
.er-node__tag { padding: 2px 6px; border-radius: 4px; background: #e2f4f0; color: #0a5d53; font-size: 11px; font-weight: 800; }
.er-node__tag[hidden] { display: none; }
.er-cors__road { position: relative; height: 70px; }
.er-cors__road::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; border-top: 2px dashed #b8b3cb; }
.er-cors__road small { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 11px; font-weight: 700; color: #80868b; }
.er-gate { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: #fff; border: 1px solid #b8b3cb; color: #6447d1; font-size: 12px; z-index: 1; }
.er-gate.is-block { background: #d93025; border-color: #d93025; color: #fff; }
/* 오가는 요청 점은 배우는 대상이라 동작 줄이기에서도 움직인다 */
.er-packet { position: absolute; top: 25px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #2a74c4; opacity: 0; z-index: 2; }
.er-packet.is-go { animation: er-go 0.7s ease-in-out forwards; }
.er-packet.is-back.is-pass { background: #0d8577; animation: er-pass 0.7s ease-in-out forwards; }
.er-packet.is-back.is-stop { background: #d93025; animation: er-stop 0.7s ease-in-out forwards; }
@keyframes er-go { 0% { left: 0; opacity: 1; } 100% { left: calc(100% - 12px); opacity: 1; } }
@keyframes er-pass { 0% { left: calc(100% - 12px); opacity: 1; } 100% { left: 0; opacity: 1; } }
@keyframes er-stop { 0% { left: calc(100% - 12px); opacity: 1; } 70% { left: calc(50% + 12px); opacity: 1; } 100% { left: calc(50% + 12px); opacity: 0.3; } }

.er-calc { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--er-line); border-radius: 8px; background: #fff; }
.er-calc__row { display: grid; grid-template-columns: 48px 70px minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 6px; border-radius: 5px; font-size: 13.5px; }
.er-calc__row code { font-family: var(--er-mono); font-weight: 700; }
.er-calc__row em { font-style: normal; font-size: 12px; font-weight: 700; color: #6a6384; }
.er-calc__row.is-bad { background: var(--er-red-t); }
.er-calc__row.is-bad em { color: #b4232f; }
.er-calc__sum { display: flex; justify-content: space-between; padding: 6px; border-top: 1px solid var(--er-line); font-weight: 900; }

.er-stackwrap { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; align-items: end; }
.er-stack {
  position: relative; display: flex; flex-direction: column-reverse; gap: 3px;
  height: 212px; padding: 18px 8px 8px; border: 1px solid var(--er-line); border-radius: 8px; background: #fff; overflow: hidden;
}
.er-stack__limit { position: absolute; left: 0; right: 0; top: 0; padding: 1px 6px; border-bottom: 2px dashed #d93025; color: #b4232f; font-size: 11px; font-weight: 800; }
.er-stack__item { flex: none; padding: 2px 6px; border-radius: 4px; background: #e3effb; color: #1b5291; font-family: var(--er-mono); font-size: 11.5px; font-weight: 700; animation: er-drop 0.2s ease-out; }
.er-stack.is-over { border-color: #d93025; }
.er-stack.is-over .er-stack__item { background: #fdeaec; color: #b4232f; }
@keyframes er-drop { from { transform: translateY(-8px); opacity: 0; } }

/* ── 한 장 카드 (공용 .kw-focus 위에 이 편의 모양만 더한다) ── */
/* 가짜 오류 화면은 폭이 좁아도 읽히고, 오른쪽 AI 문장이 길어 설명 쪽을 조금 넓힌다 */
@media (min-width: 861px) {
  .er .kw-focus__card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
}
.er-stage--focus { width: 100%; padding: 0; border: 0; background: transparent; overflow: visible; }
.er-explain--focus { width: 100%; flex: none; min-height: 44px; }
/* 카드에서는 오류 문구를 조금 크게 읽힌다 */
.er .kw-focus__stage .er-mono { font-size: 13.5px; }
.er .kw-focus__stage .er-win__page { font-size: 15px; }
.er .kw-focus__stage { gap: 12px; }
.er .kw-focus__en.er-mono { font-size: 14.5px; line-height: 1.45; white-space: normal; }
.er .kw-focus__one { margin-top: 10px; }
/* 상황 고르기: 이름과 단추를 한 줄에 둬 카드 높이를 아낀다 */
.er-focus-opts { display: grid; grid-template-columns: fit-content(132px) minmax(0, 1fr); align-items: center; gap: 8px 12px; margin-top: 10px; }
.er .er-focus-opts .kw-focus__opt { display: contents; }
.er .er-focus-opts .kw-focus__opt-label { margin: 0; font-size: 15px; line-height: 1.3; }
.er .er-focus-opts .kw-focus__opt--switch { display: flex; grid-column: 1 / -1; justify-content: flex-start; align-items: center; gap: 12px; min-height: 36px; margin: 0; }
.er .er-focus-opts .kw-focus__seg button { min-height: 40px; padding: 0 6px; font-size: 14.5px; line-height: 1.25; }
.er .kw-focus__more { margin-top: 0; }
/* "왜 생기나요?"와 "해 볼 것"은 한 줄에 나란히. 펼친 것만 한 줄을 다 쓴다 */
.er-more-row { display: flex; flex-wrap: wrap; column-gap: 18px; margin-top: 4px; }
.er-more-row > .kw-focus__more[open] { flex-basis: 100%; }
.er .kw-focus__more summary { min-height: 36px; }
.er .kw-focus__more summary i { width: 18px; text-align: center; }
.er .kw-focus__more[open] { padding-bottom: 6px; }
.er .kw-focus__say { margin-top: 12px; }
.er .kw-focus__say p { font-size: 16.5px; line-height: 1.6; }
.er .kw-focus__say mark { font-family: var(--er-mono); font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.er .kw-focus__say + .kw-focus__more { margin-top: 6px; }
.er-causes, .er-first { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.er-causes li { position: relative; padding: 6px 10px 6px 28px; border-radius: 6px; background: var(--kw-t); font-size: 15px; line-height: 1.5; }
.er-causes li::before { content: ""; position: absolute; left: 11px; top: 14px; width: 7px; height: 7px; border-radius: 2px; background: var(--kw-c); }
.er-first { counter-reset: er-first; }
.er-first li { counter-increment: er-first; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.55; }
.er-first li::before {
  content: counter(er-first); flex: none; display: grid; place-items: center;
  width: 22px; height: 22px; margin-top: 1px; border-radius: 5px; background: var(--kw-c); color: #fff; font-size: 12.5px; font-weight: 900;
}
/* API 키처럼 비밀값이 있는 오류: 접지 않고 AI 문장 바로 위에 짧게 */
.er .kw-focus__say p.er-secret {
  display: flex; align-items: baseline; gap: 8px; margin: 8px 0 0; padding: 6px 10px;
  border: 1px solid #f2b8bd; border-radius: 6px; background: #fdeef0; color: #7a1622;
  font-size: 14.5px; line-height: 1.45; font-weight: 600;
}
.er-secret > i { flex: none; font-size: 14px; color: #b4232f; }
.er-secret strong { font-weight: 900; }
/* 컴퓨터 폭: 1366×768에서도 카드 안이 스크롤되지 않게 간격만 조금 줄인다 */
@media (min-width: 861px) {
  .er .kw-focus__info { padding-top: 18px; padding-bottom: 14px; }
  .er .er-focus-opts { row-gap: 6px; }
  .er .er-focus-opts .kw-focus__seg button { min-height: 36px; }
  .er .kw-focus__say { padding-top: 10px; padding-bottom: 12px; }
  .er .kw-focus__copy { min-height: 32px; }
  .er .kw-focus__say p { margin-top: 6px; line-height: 1.55; }
}

/* ── 퀴즈 ── */
.er-options--long { grid-template-columns: minmax(0, 1fr); }
.er-option--long strong { font-size: 15.5px; line-height: 1.5; font-weight: 700; }
.kw-option small.er-mono { white-space: normal; font-size: 12px; }
.er-fb-first { display: block; margin-top: 8px; color: #c9bcff; font-weight: 700; }
.er-fb-first i { margin-right: 4px; }

/* ── 오류 보고서 ── */
.er .er-report { max-width: 1120px; }
.er-examples { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.er-examples small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.er-rep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.er-rep__form { display: grid; gap: 14px; }
.er-field .kw-field-label { display: flex; align-items: center; gap: 8px; }
.er-field__n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: #4b2fa0; color: #fff; font-size: 12px; font-weight: 900; }
.er .er-input-line { min-height: 46px; resize: none; }
.er .er-errfield { min-height: 110px; font-size: 13px; background: #fbfaff; }
.er-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.er-quick button { min-height: 32px; padding: 0 10px; border: 1px solid var(--er-line); border-radius: 5px; background: var(--er-soft); color: #4a4362; font-size: 13px; font-weight: 700; cursor: pointer; }
.er-quick button:hover { border-color: #4b2fa0; color: #4b2fa0; }
.er-warn { display: flex; gap: 10px; margin-top: 8px; padding: 10px 12px; border: 1px solid #f2b8bd; border-radius: 6px; background: #fdeef0; color: #7a1622; font-size: 14px; line-height: 1.55; }
.er-warn[hidden] { display: none; }
.er-warn > i { flex: none; margin-top: 3px; color: #b4232f; }
.er-warn strong { display: block; }
.er-rep__out { position: sticky; top: calc(var(--main-nav-height, 64px) + 16px); }
.er-compare { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
.er-rough-note { margin-top: 6px !important; font-size: 13px !important; font-weight: 700; color: #6a6384; }
.er-check { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; margin: 0 0 10px; padding: 0; list-style: none; }
.er-check li { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #8d86ad; }
.er-check li i { width: 16px; text-align: center; }
.er-check li.is-on { color: #fff; }
.er-check li.is-on i { color: #5eead4; }
.er-reptext {
  margin: 0; max-height: 380px; overflow: auto; padding: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.07);
  font-family: var(--er-mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: #eeeaff;
}
.kw-out--rich.has-secret { box-shadow: 0 0 0 3px #f2b8bd; }

/* ── 반응형 ── */
@media (max-width: 1080px) {
  .er-rep { grid-template-columns: minmax(0, 1fr); }
  .er-rep__out { position: static; }
}
@media (max-width: 960px) {
  .er-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .er .kw-hero__copy { max-width: none; }
  .er .kw-hero::before { background: linear-gradient(180deg, rgba(28, 18, 86, 0) 0, rgba(28, 18, 86, 0) 120px, rgba(28, 18, 86, 1) 170px); }
  .er .er-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .er .er-card { min-height: 112px; }
  .er-stage { padding: 10px; }
  .er-split { grid-template-columns: minmax(0, 1fr); }
  .er-stackwrap { grid-template-columns: 140px minmax(0, 1fr); }
  .er-examples { grid-template-columns: minmax(0, 1fr); }
  .er-check { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .er-http strong { font-size: 19px; }
}
@media (max-width: 360px) {
  .er .er-grid { grid-template-columns: minmax(0, 1fr); }
  .er-cors { grid-template-columns: minmax(0, 1fr); }
  .er-cors__road { height: 56px; }
}
/* 동작 줄이기: 꾸밈 효과만 끈다. 로딩 고리·요청 점·쌓이는 할 일처럼 오류 자체를 보여 주는 움직임은 그대로 둔다. */
@media (prefers-reduced-motion: reduce) {
  .er-card, .er-act, .er-switch, .er-switch > span { transition: none; }
}
