/* 글쓰기 콘솔. 블로그와 같은 활자, 다만 도구답게 밀도를 조금 높였다.
   (로그인 화면도 여기 토큰을 그대로 쓴다 — 콘솔에 디자인 시스템이 둘일 이유가 없다.) */

:root {
  --paper: #ffffff;
  --ink: #16181d;
  --ink-strong: #0a0c0f;
  --dim: #545c68;
  --faint: #949ca8;
  --line: #e7eaee;
  --line-soft: #f1f3f6;
  --wash: #f7f8fa;
  --accent: #2f5aa8;
  --accent-soft: #eaf0fa;
  --danger: #a33628;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "IBM Plex Sans KR", "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;
  /* 카드 폭. 발행된 본문 폭(39rem)보다 조금 넓게 잡아 줄바꿈 감각이 비슷하게 유지되되
     쓸 때 답답하지 않게 한다. 여기 한 줄만 바꾸면 전체가 따라온다. */
  --card: 46rem;
  --bar-h: 60px;
  --foot-h: 92px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 400 16px/1.7 var(--sans);
  letter-spacing: -0.004em;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ── 로그인 ──
   세션이 확인되기 전까지 에디터 크롬을 아예 **그리지 않는다**(display:none).
   visibility 나 투명도로 가리면 자동보관된 초고가 한 프레임 노출되고, 탭 순서상
   가려진 입력란에 포커스가 들어간다. */

body.is-locked > .bar,
body.is-locked > .notice,
body.is-locked > .stage,
body.is-locked > .foot { display: none; }

.gate {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
}

.gate[hidden] { display: none !important; }

.gate__panel {
  width: min(100%, 24rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 28px 26px;
  box-shadow: 0 24px 60px -30px rgba(16, 24, 40, .32);
}

.gate__kicker {
  margin: 0;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
}

.gate__title {
  margin: 10px 0 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
}

.gate__note { margin: 10px 0 20px; font-size: 13.5px; font-weight: 300; line-height: 1.65; color: var(--dim); }

.gate__form { display: flex; flex-direction: column; gap: 10px; }

.gate__form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 12px;
  font: 400 14px/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
}

.gate__form input:focus { outline: none; border-color: var(--accent); }
.gate__form .btn { width: 100%; padding: 11px 13px; }

/* 최소 높이를 잡아 두는 이유: 안내 문구가 나타날 때 패널이 덜컥 커지지 않게. */
.gate__msg {
  margin: 14px 0 0;
  min-height: 2.6em;
  font: 400 12.5px/1.5 var(--mono);
  color: var(--dim);
}

.gate__msg[data-tone="ok"] { color: #2a6b4d; }
.gate__msg[data-tone="err"] { color: var(--danger); }

/* ── 상단 바 ── */

.bar {
  flex: none;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.bar__left, .bar__right { display: flex; align-items: center; gap: 8px; flex: none; }

.bar__title {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: 600 18.5px/1.4 var(--sans);
  letter-spacing: -0.028em;
  color: var(--ink-strong);
  text-align: center;
  padding: 6px 10px;
  border-radius: 4px;
}

.bar__title::placeholder { color: #c4cad2; font-weight: 400; }
.bar__title:focus { outline: none; background: var(--wash); }

.status {
  font: 400 11.5px/1 var(--mono);
  color: var(--faint);
  min-width: 5.5rem;
  text-align: right;
  transition: color .2s ease;
}

.status[data-tone="ok"] { color: #2a6b4d; }
.status[data-tone="err"] { color: var(--danger); }
/* 경고 — "된 것"과 "못 한 것"의 사이. 메타데이터를 못 지운 사진이 초록으로 뜨던 것이
   리뷰가 잡은 결함이다: 사용자는 "EXIF 자동 제거"를 믿는데 GPS 가 그대로 나간다. */
.status[data-tone="warn"] { color: #8a5a12; }

/* ── 버튼 ── */

.btn {
  font: 500 12.5px/1 var(--mono);
  padding: 8px 13px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
  white-space: nowrap;
}

.btn--ghost {
  background: none;
  border-color: var(--line);
  color: var(--dim);
}

.btn--ghost:hover { border-color: #cfd5dd; color: var(--ink-strong); background: var(--wash); }

.btn--solid {
  background: var(--ink-strong);
  color: #fff;
}

.btn--solid:hover { background: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }

/* 로그인한 이메일 겸 로그아웃 버튼. 주소가 길어도 바를 밀어내지 않게 잘라 둔다. */
.who {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--faint);
  border-color: transparent;
}

.who:hover { color: var(--danger); border-color: var(--line); background: var(--wash); }
.who:empty { display: none; }

/* ── 사라지지 않는 알림 ──
   .status 는 4초 뒤 스스로 지워진다. 지나가면 사고가 되는 것(메타데이터를 못 지운 사진,
   올릴 수 없어 버린 파일)은 여기 남아 사용자가 닫을 때까지 버틴다. */

.notice {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px;
  font: 400 13px/1.55 var(--sans);
  border-bottom: 1px solid var(--line);
  background: #fff8e8;
  color: #6b4a12;
}

.notice[data-tone="err"] { background: #fdeceb; color: #7a2318; }
.notice[hidden] { display: none !important; }
.notice__text { flex: 1; min-width: 0; }

.notice__close {
  flex: none;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  opacity: .65;
  font: 500 13px/1 var(--mono);
  padding: 2px 4px;
}

.notice__close:hover { opacity: 1; }

/* ── 저장·발행 중 ──
   편집 표면 전체를 얼린다. 근거는 editor.js 의 setBusy() 주석 — 버튼 몇 개를 disabled 로
   만드는 방식은 render() 가 카드를 다시 그릴 때마다 새는 곳이 생긴다.

   실제로 막는 것은 JS 가 거는 `inert` 다. 여기 CSS 는 두 가지만 한다:
     1. 얼어 있다는 것을 눈으로 알리기(커서·옅은 농도) — 클릭이 조용히 무시되면
        사용자는 버그로 읽는다.
     2. `inert` 를 모르는 브라우저를 위한 폴백(.is-busy--hard). 그쪽은 스크롤과 텍스트
        선택까지 함께 멈추므로, 지원하는 브라우저에는 걸지 않는다. */

body.is-busy .bar,
body.is-busy .stage,
body.is-busy .foot { cursor: progress; }

body.is-busy .bar__left,
body.is-busy .stage,
body.is-busy .foot { opacity: .55; transition: opacity .12s ease; }

body.is-busy--hard .bar,
body.is-busy--hard .stage,
body.is-busy--hard .foot,
body.is-busy--hard .sheet:not(#publish-sheet) { pointer-events: none; }

/* ── 무대 ── */

.stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(6px);
  color: var(--dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: opacity .16s ease, border-color .16s ease, color .16s ease;
}

.nav:hover { color: var(--ink-strong); border-color: #cfd5dd; }
.nav:disabled { opacity: 0; pointer-events: none; }
.nav--prev { left: 18px; }
.nav--next { right: 18px; }

/* 카드 트랙 — 스크롤 스냅이라 트랙패드 스와이프가 그대로 동작한다 */
.deck {
  flex: 1;
  /* 카드의 offsetParent를 이 요소로 고정한다. goTo()가 offsetLeft로 스크롤 위치를
     직접 계산하므로 기준이 흔들리면 안 된다. */
  position: relative;
  display: flex;
  /* safe center: 카드가 화면보다 길어지면 가운데 정렬을 포기하고 위를 맞춘다.
     (그냥 center면 넘칠 때 카드 윗부분이 잘려서 스크롤로도 못 본다.) */
  align-items: safe center;
  gap: 28px;
  overflow-x: auto;
  overflow-y: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 34px max(20px, calc((100% - var(--card)) / 2)) 34px;
  scrollbar-width: none;
}

.deck::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: reduce) {
  .deck { scroll-behavior: auto; }
}

/* ── 카드 ── */

.card {
  flex: none;
  width: min(100%, var(--card));
  scroll-snap-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: .34;
  transform: scale(.975);
  transition: opacity .22s ease, transform .22s ease, border-color .18s ease, box-shadow .22s ease;
}

.card.is-current {
  opacity: 1;
  transform: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -14px rgba(16, 24, 40, .22);
}

.card.is-drop { border-color: var(--accent); background: var(--accent-soft); }

.card__index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .12em;
  color: var(--faint);
}

.card__tools { display: flex; gap: 4px; }

.icon-btn {
  border: 0;
  background: none;
  cursor: pointer;
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .08em;
  color: var(--faint);
  padding: 4px 6px;
  border-radius: 4px;
}

.icon-btn:hover { color: var(--ink-strong); background: var(--wash); }
.icon-btn--danger:hover { color: var(--danger); background: #fdf1ef; }

/* 이미지 영역 */

.drop {
  border: 1px dashed #d5dae2;
  border-radius: 6px;
  min-height: 132px;
  display: grid;
  place-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--faint);
  background: #fcfdfe;
  transition: border-color .14s ease, color .14s ease, background-color .14s ease;
  text-align: center;
  padding: 20px;
}

.drop:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.drop__label { font: 400 12px/1.5 var(--mono); }
.drop__hint { font-size: 11.5px; color: #b6bdc7; }

/* ── 이미지 레이아웃 ── */

.layout-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  background: none;
  border-radius: 5px;
  padding: 6px 11px;
  font: 500 11.5px/1 var(--mono);
  color: var(--dim);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .14s ease, color .14s ease, background-color .14s ease;
}

.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip--on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.mini-field { display: flex; align-items: center; gap: 5px; }

.mini-field > span {
  font: 500 10px/1 var(--mono);
  letter-spacing: .1em;
  color: var(--faint);
}

.mini-field select {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 6px;
  font: 400 11.5px/1.2 var(--mono);
  color: var(--dim);
  background: var(--paper);
}

.mini-field select:focus { outline: none; border-color: var(--accent); }

.layout-bar__note {
  flex: 1 1 100%;
  font: 400 11px/1.5 var(--mono);
  color: #b6bdc7;
}

/* 칸 격자 — global.css 의 .collage 와 같은 커스텀 속성으로 그린다.
   여기서 보이는 배치가 곧 발행 결과다(굽든 그리드로 내든). */
/* 세로로 긴 틀(인생네컷은 1:0.35)을 카드 폭에 그대로 맞추면 화면 밖으로 넘어간다.
   폭을 '높이 상한 × 비율'로 묶어 두면 어떤 틀이든 한눈에 들어온다. */
.slots {
  width: min(100%, calc(46vh * var(--collage-ratio, 1)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(var(--collage-cols, 1), 1fr);
  grid-template-rows: repeat(var(--collage-rows, 1), 1fr);
  aspect-ratio: var(--collage-ratio, 1);
  gap: var(--collage-gap, 0px);
  padding: var(--collage-pad, 0px);
  background: var(--collage-bg, transparent);
  border-radius: 6px;
  overflow: hidden;
}

.slots[data-gap="thin"] { --collage-gap: 5px; }
.slots[data-gap="wide"] { --collage-gap: 13px; }
.slots[data-bg="white"] { --collage-bg: #fff; --collage-pad: var(--collage-gap, 0px); }
.slots[data-bg="black"] { --collage-bg: #111315; --collage-pad: var(--collage-gap, 0px); }

/* 바탕이 없으면 빈 칸이 어디까지인지 안 보인다 — 격자에 옅은 판을 깔아둔다. */
.slots[data-bg="none"] { background: repeating-conic-gradient(#f4f6f8 0% 25%, #fbfcfd 0% 50%) 0 0 / 16px 16px; }

.slot {
  grid-area: var(--ga, auto);
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #fcfdfe;
  box-shadow: inset 0 0 0 1px #e2e6ec;
  display: grid;
  place-items: center;
  min-height: 0;
  cursor: pointer;
}

.slot:not(.slot--filled):hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.slot.is-drop { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.slot.is-dragging { opacity: .4; }

.slot--filled { cursor: grab; box-shadow: none; }
.slot--filled:active { cursor: grabbing; }

.slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
}

.slot__plus { font: 400 17px/1 var(--mono); color: #c4cad2; }
.slot:hover .slot__plus { color: var(--accent); }

.slot__remove {
  position: absolute;
  top: 5px;
  right: 5px;
  border: 0;
  border-radius: 4px;
  width: 21px;
  height: 21px;
  font: 500 11px/1 var(--mono);
  background: rgba(10, 12, 15, .66);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s ease;
}

.slot:hover .slot__remove, .slot__remove:focus-visible { opacity: 1; }

/* 레이아웃 고르기 시트 */

.layout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 10px;
}

.layout-option {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 12px 10px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  transition: border-color .14s ease, background-color .14s ease;
}

.layout-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.layout-option.is-current { border-color: var(--accent); background: var(--accent-soft); }

.layout-option__name { font: 400 11px/1.35 var(--mono); color: var(--dim); text-align: center; }

/* 미리보기 도형 — 실제 배치와 같은 표에서 그린다. */
.layout-mini {
  /* 폭을 비율에서 거꾸로 구한다 — 높이가 5.2rem을 넘지 않으면서 모양이 안 찌그러진다. */
  width: min(100%, calc(5.2rem * var(--collage-ratio, 1)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(var(--collage-cols, 1), 1fr);
  grid-template-rows: repeat(var(--collage-rows, 1), 1fr);
  aspect-ratio: var(--collage-ratio, 1);
  gap: 3px;
}

.layout-mini span {
  grid-area: var(--ga, auto);
  background: #dde2e9;
  border-radius: 2px;
}

.layout-option:hover .layout-mini span,
.layout-option.is-current .layout-mini span { background: var(--accent); }

.shot { position: relative; }

.shot img {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: var(--wash);
}

.shot__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  border-radius: 4px;
  padding: 5px 9px;
  font: 500 11px/1 var(--mono);
  background: rgba(10, 12, 15, .72);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s ease;
}

.shot:hover .shot__remove, .shot__remove:focus-visible { opacity: 1; }

.caption-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  padding: 7px 2px;
  font: 400 13px/1.5 var(--mono);
  color: var(--dim);
  text-align: center;
}

.caption-input::placeholder { color: #c4cad2; }
.caption-input:focus { outline: none; border-bottom-color: var(--line); }

/* 본문 입력 */

.card__text {
  width: 100%;
  border: 0;
  background: none;
  resize: none;
  padding: 10px 4px 12px;
  font: 400 17.5px/1.9 var(--sans);
  letter-spacing: -0.004em;
  color: var(--ink);
  /* 화면 높이에 비례해 기본 높이를 준다. 고정값만 쓰면 큰 화면에서
     카드가 조그맣게 떠 있고 위아래가 텅 빈다. */
  min-height: max(13rem, 36vh);
  overflow: hidden;
}

.card__text:focus { outline: none; }
.card__text::placeholder { color: #c4cad2; }

/* ── 하단 ── */

.foot {
  flex: none;
  height: var(--foot-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.dots { display: flex; align-items: center; gap: 7px; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #d7dce3;
  cursor: pointer;
  transition: background-color .16s ease, width .16s ease, border-radius .16s ease;
}

.dot:hover { background: #b6bdc7; }
.dot.is-current { background: var(--ink-strong); width: 18px; border-radius: 4px; }

.dot--add {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: none;
  border: 1px solid var(--line);
  color: var(--faint);
  font: 400 13px/1 var(--mono);
  display: grid;
  place-items: center;
  margin-left: 5px;
}

.dot--add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.hint {
  margin: 0;
  font: 400 11px/1 var(--mono);
  color: #b6bdc7;
}

kbd {
  font: inherit;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 1px 4px;
  color: var(--dim);
  background: var(--paper);
}

/* ── 시트 (모달) ── */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(16, 20, 26, .34);
  display: grid;
  place-items: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}

.sheet[hidden] { display: none !important; }

.sheet__panel {
  width: min(100%, 30rem);
  max-height: min(84vh, 46rem);
  overflow-y: auto;
  background: var(--paper);
  border-radius: 10px;
  padding: 22px 24px 24px;
  box-shadow: 0 24px 60px -20px rgba(16, 24, 40, .4);
}

.sheet--wide .sheet__panel { width: min(100%, 46rem); }

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.sheet__head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sheet__note { margin: 0 0 12px; font-size: 13.5px; color: var(--dim); font-weight: 300; }
.sheet__actions { display: flex; justify-content: flex-end; margin-top: 14px; }

.fields { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field--row { flex-direction: row; gap: 20px; align-items: center; }

.field > span {
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

.field small { font: 400 11.5px/1.5 var(--mono); color: #b6bdc7; }
.field code { font-size: .95em; color: var(--dim); }

.field input[type="text"],
.field input[type="date"],
.field textarea,
.field select,
#import-text {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 11px;
  font: 400 14px/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
  resize: vertical;
}

#import-text { font-family: var(--sans); font-size: 14px; }

.field input:focus, .field textarea:focus, .field select:focus, #import-text:focus {
  outline: none;
  border-color: var(--accent);
}

.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--dim);
  cursor: pointer;
}

/* 글 목록 */

.library { list-style: none; margin: 0; padding: 0; }

.library li + li { border-top: 1px solid var(--line-soft); }

.library button {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 12px 8px;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-radius: 5px;
}

.library button:hover { background: var(--wash); }

.library__date { font: 400 11.5px/1.6 var(--mono); color: var(--faint); flex: none; }
.library__title { font-size: 14.5px; color: var(--ink-strong); }
.library__flag { margin-left: auto; font: 400 10.5px/1 var(--mono); color: var(--danger); flex: none; }
/* 발행된 글 — 초고와 같은 자리를 쓰되 경고색이 아니다. */
.library__flag--live { color: #2a6b4d; }
.library__empty { padding: 12px 8px; font-size: 13.5px; color: var(--faint); }

/* 발행 결과 */

.result { margin: 0 0 4px; display: grid; grid-template-columns: 5.5rem 1fr; gap: 8px 14px; }
.result dt { font: 500 11px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.result dd { margin: 0; font: 400 13px/1.6 var(--mono); color: var(--ink-strong); word-break: break-all; }
.result a { color: var(--accent); }
/* 발행 실패도 같은 시트에 뜬다. 성공과 한눈에 갈리도록 색을 바꾼다. */
.result[data-tone="err"] dd { color: var(--danger); }

/* 미리보기 — 실제 사이트 CSS를 그대로 쓰기 위해 iframe으로 격리한다.
   (site.css를 이 문서에 직접 붙이면 body 규칙이 에디터 크롬을 덮어쓴다.) */

.preview {
  width: 100%;
  height: min(70vh, 40rem);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  display: block;
}

@media (max-width: 44rem) {
  .bar { flex-wrap: wrap; height: auto; padding: 10px 12px; gap: 10px; }
  .bar__title { order: -1; width: 100%; flex-basis: 100%; text-align: left; }
  .nav { display: none; }
}
