/* 디지털 콘텐츠와 문제 해결 — 공통 스타일(../quiz/css/app.css)과 친환경 건축물 스타일(로그인·갤러리·머리말) 위에 남색으로 얹는다.
   body 에 class="green digital" 을 함께 준다. 크롬북·태블릿이 기본이고 375px 휴대폰과 교실 TV 에서도 본다. */
body.digital {
  --bg: #f3f5fb; --text: #1d2433; --muted: #5a6376; --line: #dde2ef;
  --primary: #3949c7; --primary-dark: #26318f; --earth: #b34a12; --soft: #eef0ff; --sun: #ffd43b;
  --ok: #2b8a3e; --ok-soft: #ebfbee; --bad: #c92a2a; --bad-soft: #fff0f0; --warn: #8a5a00; --warn-soft: #fff4d6;
  background: var(--bg);
}
.digital .center-row { justify-content: center; }
.digital .guest-row { margin-top: 6px; }
.digital .guest-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.digital .btn.chip.on { background: var(--primary); color: #fff; }
.digital .field > span { font-weight: 600; }
.digital textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; resize: vertical; }
.digital input:focus-visible, .digital textarea:focus-visible, .digital button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.teacher-foot { margin-top: 20px; }
.teacher-foot a { color: var(--primary-dark); font-weight: 700; }

/* 올린 작품 카드의 빛: 초록 대신 남색 */
.digital .work-card.uploaded {
  border-color: #aab4f2;
  box-shadow: 0 0 0 3px rgba(57, 73, 199, .12), 0 6px 20px rgba(57, 73, 199, .24);
  animation: news-glow 2.6s ease-in-out infinite;
}
@keyframes news-glow {
  50% { box-shadow: 0 0 0 4px rgba(57, 73, 199, .2), 0 8px 28px rgba(57, 73, 199, .36); }
}

/* ---- 뜻풀이 두 칸, 여섯 가지 방법 ---- */
.def-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.def { background: var(--soft); border-radius: 14px; padding: 12px 14px; }
.def b { color: var(--primary-dark); font-size: 1.1rem; }
.def p { margin: 6px 0 0; }
.habit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.habit-list li { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.habit-emoji { font-size: 1.6rem; line-height: 1.2; flex: none; }
.habit-list small { display: block; font-size: .9rem; }
.place-emoji { font-size: 1.3rem; }
.place-example { margin: 0; font-weight: 400; }

/* ---- 고르기 게임 ---- */
.pick-game { display: grid; gap: 14px; }
.pg-progress { margin: 0; font-weight: 800; color: var(--muted); }
.pg-prompt { display: grid; justify-items: center; gap: 8px; text-align: center; background: var(--soft); border-radius: 18px; padding: 20px 16px; }
.pg-emoji { font-size: 3.4rem; line-height: 1; }
.pg-text { margin: 0; font-size: 1.45rem; font-weight: 800; line-height: 1.4; }
.pg-box { margin: 4px 0 0; padding: 10px 14px 10px 34px; background: #fff; border-radius: 12px; text-align: left; font-size: 1.05rem; }
.pg-options { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-options.n3, .pg-options.n4 { grid-template-columns: minmax(0, 1fr); }
.pg-options.n5, .pg-options.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-opt {
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px 16px; text-align: left;
  border: 2px solid var(--line); border-radius: 14px; background: #fff; font-size: 1.15rem; font-weight: 700; cursor: pointer;
}
.pg-opt:hover:not(:disabled) { border-color: var(--primary); }
.pg-opt:disabled { cursor: default; color: var(--muted); }
.pg-opt.right { border-color: var(--ok); background: var(--ok-soft); color: var(--text); }
.pg-opt.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--text); }
.pg-opt-emoji { font-size: 1.6rem; flex: none; }
.pg-why { padding: 12px 14px; border-radius: 12px; }
.pg-why.right { background: var(--ok-soft); }
.pg-why.wrong { background: var(--warn-soft); }
.pg-result { text-align: center; }
.pg-score { margin: 0; font-size: 2.2rem; font-weight: 900; color: var(--primary-dark); }
.pg-praise { margin: 0; font-size: 1.15rem; font-weight: 700; }
.pg-review { text-align: left; background: var(--soft); border-radius: 14px; padding: 12px 16px; }
.pg-review ul { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.pg-result .btn { justify-self: center; }

/* ---- 카드 한 장(정사각형). 글자 크기는 카드 너비를 따라간다(cqw) ---- */
.nc {
  container-type: inline-size; position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  display: flex; flex-direction: column; padding: 7%; border-radius: 5%;
  background: var(--nc-bg, #fffdf5); color: var(--nc-ink, #1d2433); text-align: left; line-height: 1.3;
  word-break: keep-all; overflow-wrap: anywhere;
}
.nc-sticker { font-size: 16cqw; line-height: 1.1; }
.nc-title { font-weight: 900; margin-top: 2cqw; }
.nc-title.fit-l { font-size: 9cqw; }
.nc-title.fit-m { font-size: 7.4cqw; }
.nc-title.fit-s { font-size: 6.2cqw; }
.nc-body { margin-top: 3cqw; white-space: pre-line; line-height: 1.4; }
.nc-body.fit-l { font-size: 5.4cqw; }
.nc-body.fit-m { font-size: 4.6cqw; }
.nc-body.fit-s { font-size: 3.9cqw; }
.nc .ph { opacity: .42; font-weight: 600; }
.nc-foot {
  margin-top: auto; padding-top: 2cqw; display: flex; justify-content: space-between; align-items: flex-end; gap: 3cqw;
  font-size: 3.2cqw; font-weight: 700; color: var(--nc-accent, #d9480f);
}
.nc-source { min-width: 0; }
.nc-page { flex: none; }
.nc-cover, .nc-end { text-align: center; }
.nc-cover .nc-sticker, .nc-end .nc-sticker { font-size: 24cqw; margin-top: 4cqw; }
.nc-cover .nc-title.fit-l { font-size: 11cqw; }
.nc-cover .nc-title.fit-m { font-size: 9cqw; }
.nc-cover .nc-title.fit-s { font-size: 7cqw; }
.nc-end .nc-title::after {
  content: ''; display: block; width: 18cqw; height: 1.4cqw; border-radius: 1cqw; margin: 3cqw auto 0; background: var(--nc-accent, #d9480f);
}
.nc-cover .nc-foot, .nc-end .nc-foot { text-align: left; }

/* ---- 그림 카드(밖에서 만든 그림 한 장). 자유 꾸미기 카드는 minicanva 의 .fe-card 가 그린다 ---- */
.nc-image { display: block; padding: 0; }
.nc-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.nc-empty {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 8%; text-align: center;
  font-size: 5cqw; font-weight: 700; opacity: .45; pointer-events: none;
}

/* ---- 카드뉴스 넘겨 보기 ---- */
.nv { display: grid; gap: 10px; margin: 8px 0 12px; border-radius: 14px; }
.nv-row { display: grid; grid-template-columns: auto minmax(0, 460px) auto; justify-content: center; align-items: center; gap: 10px; }
.nv-stage { box-shadow: var(--shadow); border-radius: 5%; }
.nv-arrow {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-size: 1.1rem; cursor: pointer;
}
.nv-arrow:hover:not(:disabled) { border-color: var(--primary); }
.nv-arrow:disabled { opacity: .35; cursor: default; }
.nv-dots { display: flex; justify-content: center; gap: 8px; }
.nv-caption { margin: 0; text-align: center; font-size: .95rem; overflow-wrap: anywhere; }
.nv-dot { width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 0; background: #c9cfe6; cursor: pointer; }
.nv-dot.on { background: var(--primary); }

/* ---- 카드뉴스 편집 ---- */
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.topic-pick {
  display: grid; gap: 4px; justify-items: start; text-align: left; padding: 16px; min-height: 150px;
  border: 2px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer;
}
.topic-pick:hover { border-color: var(--primary); }
.topic-emoji { font-size: 2.4rem; line-height: 1; }
.topic-pick b { font-size: 1.25rem; color: var(--primary-dark); }
.topic-pick.on { border-color: var(--primary); background: var(--soft); box-shadow: 0 0 0 3px rgba(57, 73, 199, .18); }
.topic-pick:disabled { opacity: .55; cursor: default; }
.news-start h2 { margin: 6px 0 0; }
.news-start h2 + .topic-grid { margin-bottom: 18px; }
.mode-pick { min-height: 130px; }
.topic-bar { margin: 0; }
.idea-box summary { cursor: pointer; font-weight: 700; color: var(--primary-dark); min-height: 36px; }
.idea-list { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
.news-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; --fe-scroll-top: 144px; }
/* 옆 메뉴의 목록(템플릿 24개 · 요소 77개)은 칸 안에서 스크롤한다. 그대로 길게 늘이면 그 아래의 출처 칸과 올리기 단추가 몇 화면 밑으로 밀린다. */
.news-form .fe-tabbody { max-height: clamp(320px, calc(100vh - 300px), 620px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.news-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.news-mini {
  width: 76px; padding: 3px; border: 3px solid transparent; border-radius: 10px; background: none; cursor: pointer; flex: none;
}
.news-mini.on { border-color: var(--primary); }
.news-mini.add {
  aspect-ratio: 1 / 1; display: grid; place-items: center; border: 2px dashed #b9c0dd; color: var(--primary-dark);
  font-size: 1.8rem; font-weight: 800; background: #fff;
}
.news-mini.add:hover { border-color: var(--primary); }
.news-stage { max-width: 460px; margin: 0 auto; box-shadow: var(--shadow); border-radius: 5%; }
.news-strip-ctl { justify-content: center; }
.news-add-menu {
  display: grid; gap: 6px; margin: -4px 0 12px; padding: 10px 12px; border: 2px dashed #b9c0dd; border-radius: 14px; background: #fafbff;
}
.news-add-menu .row { margin: 0; }
.news-help { font-weight: 400; line-height: 1.45; }
.news-kind { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--soft); font-weight: 600; }
.news-left .nv-caption { margin-top: 8px; }
.digital input.bg-custom { width: 48px; padding: 2px; background: #fff; }
.news-count { font-weight: 400; }
.sticker-row { margin-top: 0; }
.sticker-now { font-size: 2rem; line-height: 1; min-width: 44px; text-align: center; }
.sticker-now.none { font-size: 1rem; font-weight: 400; color: var(--muted); }
.sticker-picker { margin-top: 8px; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: #fafbff; }
.sticker-search { width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; margin: 8px 0; max-height: 230px; overflow: auto; }
.sticker { height: 52px; border: 2px solid transparent; border-radius: 10px; background: #fff; font-size: 1.7rem; cursor: pointer; }
.sticker:hover, .sticker.on { border-color: var(--primary); }
.sticker-picker p { margin: 0; font-size: .9rem; font-weight: 400; }
.bg-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-swatch { width: 48px; height: 48px; border-radius: 12px; border: 2px solid rgba(29, 36, 51, .18); font-weight: 900; cursor: pointer; }
.bg-swatch.on { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--primary); }
.news-review { display: grid; gap: 6px; margin-bottom: 10px; }
.news-review p { margin: 0; padding: 8px 12px; border-radius: 10px; font-weight: 700; }
.news-problem { background: var(--bad-soft); color: #8f1d1d; }
.news-warning { background: var(--warn-soft); color: #6a4500; }
.news-fine { background: var(--ok-soft); color: #1f6a2e; }
.news-check { border: 2px solid var(--line); border-radius: 14px; padding: 8px 12px; background: #fff; }
.news-check:has(input:checked) { border-color: var(--primary); background: var(--soft); }
.news-check-card .check-list { margin: 0 0 4px; }

/* ---- 자유 꾸미기 편집기 ----
   편집기와 요소의 스타일은 ../../minicanva/minicanva.css 에 있다(다른 프로젝트에도 옮겨 쓰는 모듈). 여기서는 색과 놓는 자리만 맞춘다. */
body.digital {
  --fe-primary: var(--primary); --fe-primary-dark: var(--primary-dark); --fe-soft: var(--soft); --fe-line: var(--line);
  --fe-text: var(--text); --fe-muted: var(--muted); --fe-warn: var(--earth); --fe-warn-soft: var(--warn-soft); --fe-shadow: var(--shadow);
  --fe-pop-width: calc(50% - 8px);
}
.news-tools:empty { display: none; }

/* ---- 카드뉴스 갤러리·작품 보기 ---- */
.news-thumb { width: 100%; pointer-events: none; }
.news-thumb.blank { aspect-ratio: 1 / 1; border-radius: 5%; background: #e2e5e9; }
.news-card .work-title { margin-top: 8px; }
.news-comments { max-height: 260px; margin-bottom: 10px; }
.news-comments li b { color: var(--primary-dark); flex: none; }
.news-comment-text { flex: 1 1 160px; min-width: 0; }
.news-comment-form p { margin: 0; font-size: .95rem; }
.news-comment-form input { padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.news-remove { margin-top: 16px; }
.news-modal h4 { margin: 12px 0 6px; color: var(--earth); }
body.gb-tv .news-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
body.gb-tv .nv-row { grid-template-columns: auto minmax(0, 620px) auto; }

/* ---- 절차 로봇 ---- */
.robot-tabs .tab small { font-weight: 600; opacity: .8; }
.robot-stars { color: #b7791f; letter-spacing: 1px; white-space: nowrap; }
.proc-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.proc-stage {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center;
  background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px;
}
.proc-n {
  grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: #e6e9f5; color: var(--muted); font-weight: 900; font-size: 1.1rem;
}
.proc-stage b { font-size: 1rem; }
.proc-stage small { color: var(--muted); font-size: .88rem; }
.proc-stage.on { border-color: var(--primary); }
.proc-stage.on .proc-n { background: var(--primary); color: #fff; }
.robot-bench { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.robot-problem { background: var(--soft); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.robot-q { margin: 0 0 4px; font-size: 1.3rem; font-weight: 900; color: var(--primary-dark); line-height: 1.35; }
.robot-goal { margin: 0; font-size: .98rem; }
.robot-h small { font-size: .9rem; font-weight: 400; }
.robot-pool { display: grid; gap: 8px; }
.robot-card {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 10px 14px; text-align: left;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 1.05rem; cursor: pointer;
}
.robot-card:hover:not(:disabled) { border-color: var(--primary); }
.robot-card:disabled { cursor: default; opacity: .6; }
.robot-plus { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--primary-dark); font-weight: 900; flex: none; }
.robot-prog { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.robot-row {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 56px;
  padding: 6px 6px 6px 8px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 1.05rem;
}
.robot-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #e6e9f5; font-weight: 900; }
.robot-ctl { display: flex; gap: 4px; }
.robot-ctl button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 1.1rem; cursor: pointer; }
.robot-ctl button:hover:not(:disabled) { border-color: var(--primary); }
.robot-ctl button:disabled { opacity: .4; cursor: default; }
.robot-row.cur { border-color: var(--primary); box-shadow: 0 0 0 3px var(--soft); }
.robot-row.ok { border-color: var(--ok); background: var(--ok-soft); }
.robot-row.ok .robot-num { background: var(--ok); color: #fff; }
.robot-row.err { border-color: var(--bad); background: var(--bad-soft); }
.robot-row.err .robot-num { background: var(--bad); color: #fff; }
.robot-row.extra { border-color: #d9a400; background: var(--warn-soft); }
.robot-row.extra .robot-num { background: #d9a400; color: #fff; }
.robot-empty { border: 2px dashed #b9c0dd; border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); }
.robot-stage { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--soft); border-radius: 14px; padding: 12px; }
.robot-face svg { width: 104px; height: auto; display: block; }
.robot-face .eye { fill: #74c0fc; }
.robot-face .mouth { stroke: #74c0fc; }
.robot-face.err .eye { fill: #ff8787; } .robot-face.err .mouth { stroke: #ff8787; }
.robot-face.ok .eye { fill: #69db7c; } .robot-face.ok .mouth { stroke: #69db7c; }
.robot-face.warn .eye { fill: #ffd43b; } .robot-face.warn .mouth { stroke: #ffd43b; }
.robot-face.run .antenna { animation: robot-blink .6s steps(2) infinite; }
@keyframes robot-blink { 50% { fill: #ffd43b; } }
.robot-bubble {
  position: relative; min-height: 84px; padding: 12px 14px; background: #fff; border: 2px solid var(--line); border-radius: 12px;
  font-family: ui-monospace, 'D2Coding', 'Nanum Gothic Coding', Consolas, monospace; font-size: 1.02rem; line-height: 1.5;
}
.robot-bubble.ok { border-color: var(--ok); }
.robot-bubble.err { border-color: var(--bad); }
.robot-bubble.warn { border-color: #d9a400; }
.robot-hint { display: block; margin-top: 6px; font-family: var(--font); font-size: .92rem; color: var(--muted); }
.robot-result { font-size: 1.7rem; letter-spacing: 3px; color: #b7791f; font-family: var(--font); }
.robot-actions { margin-top: 12px; }
.robot-run { flex: 1 1 200px; width: auto; background: #d9480f; color: #fff; font-size: 1.25rem; }
.robot-run:hover:not(:disabled) { background: #b83a08; }
.robot-meta { margin: 10px 0 0; font-size: .92rem; }
.robot-help summary { cursor: pointer; font-weight: 800; }
.robot-help ol { margin: 8px 0 0; padding-left: 1.3em; display: grid; gap: 4px; }

/* 선생님 현황판 */
.robot-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.robot-stat { display: grid; justify-items: center; min-width: 110px; padding: 10px 16px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.robot-stat b { font-size: 1.8rem; line-height: 1.1; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.robot-stat span { font-size: .9rem; color: var(--muted); font-weight: 700; }
.robot-stat.warn b { color: var(--bad); }
.robot-table { background: #fff; border-radius: 14px; }
.robot-table td, .robot-table th { white-space: nowrap; }
.robot-cell-ok { background: var(--ok-soft); }
.robot-cell-try { background: var(--warn-soft); }
.robot-row-idle td { color: #868e96; }
.robot-row-help td:nth-child(2) { font-weight: 800; }
.robot-help-chip { margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .82rem; font-weight: 800; }
.robot-row-done td:nth-child(2)::after { content: ' ✅'; }
body.gb-tv .robot-table { font-size: 1.15rem; }

/* 꽃길 코딩 현황판 */
.lc-hard { margin: 0 0 12px; padding: 14px 16px; display: grid; gap: 8px; }
.lc-hard h3, .lc-h { margin: 0; font-size: 1.05rem; }
.lc-h { margin: 18px 0 4px; }
.lc-hard-row { display: grid; grid-template-columns: auto auto auto 1fr; gap: 6px 12px; align-items: baseline; padding: 6px 10px; border-radius: 10px; background: var(--soft); }
.lc-hard-row.warn { background: var(--bad-soft); }
.lc-learn-link { font-size: 13px; text-decoration: underline; justify-self: start; }
.lc-hard-code { font-size: 1.2rem; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.lc-hard-n { font-weight: 800; }
.lc-hard-row.warn .lc-hard-n { color: var(--bad); }
.lc-hard-who { font-size: .9rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { .lc-hard-row { grid-template-columns: auto 1fr auto; } .lc-hard-who { grid-column: 1 / -1; } }
.lc-strip { display: flex; gap: 5px; align-items: center; }
.lc-strip-group { display: flex; gap: 2px; }
.lc-strip-group.bonus { padding-left: 5px; border-left: 2px dashed #ced4da; }
.lc-cell { width: 11px; height: 16px; border-radius: 3px; background: #edf0f2; box-sizing: border-box; }
.lc-cell.try { background: var(--warn-soft); box-shadow: inset 0 0 0 1.5px #d9a400; }
.lc-cell.s1 { background: color-mix(in srgb, var(--c) 35%, #fff); }
.lc-cell.s2 { background: color-mix(in srgb, var(--c) 65%, #fff); }
.lc-cell.s3 { background: var(--c); }
.lc-cell.now { outline: 2px solid #212529; outline-offset: 1px; }
body.gb-tv .lc-cell { width: 14px; height: 20px; }

/* ---- 그림 텔레파시 ---- */
.tp-board {
  width: min(100%, 420px); aspect-ratio: 1 / 1; margin: 10px auto; display: grid; place-items: center;
  border: 3px solid var(--line); border-radius: 18px; background: #fff;
}
.tp-svg { width: 100%; height: 100%; display: block; }
.tp-cover { margin: 0; padding: 24px; text-align: center; color: var(--muted); font-weight: 700; }
.tp-card .live-score { text-align: center; }
.tp-card .row { justify-content: center; }

/* ---- 해결사 게시판 ---- */
.case-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.case-card { margin: 0; display: grid; gap: 6px; align-content: start; }
.case-card.own { border: 2px solid #ffe08a; background: #fffdf3; }
.case-card p { margin: 0; }
.case-owner { font-size: .92rem; font-weight: 700; }
.case-problem { font-size: 1.12rem; font-weight: 800; }
.case-chip { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--soft); color: var(--primary-dark); font-weight: 800; }

/* ---- 좁은 화면 ---- */
@media (max-width: 860px) {
  .news-editor, .robot-bench { grid-template-columns: minmax(0, 1fr); }
  .proc-stage small { display: none; }
  .proc-n { grid-row: auto; }
}
@media (max-width: 600px) {
  .def-grid, .habit-list, .topic-grid, .proc-stages { grid-template-columns: minmax(0, 1fr); }
  .pg-options, .pg-options.n5, .pg-options.n6 { grid-template-columns: minmax(0, 1fr); }
  .pg-text { font-size: 1.25rem; }
  .topic-pick { min-height: 0; }
  .nv-arrow { width: 40px; height: 40px; }
  .robot-stage { grid-template-columns: 72px minmax(0, 1fr); }
  .robot-face svg { width: 72px; }
}
/* 두 칸으로 보일 때: 오른쪽 도구 칸을 길게 내려도 카드가 따라오게 왼쪽 칸을 붙여 둔다(화면 높이에 맞춰 카드 크기도 줄인다). */
/* 두 칸으로 보일 때: 도구 막대는 두 칸 위에 길게 놓고 화면 위에 붙여 둔다(카드의 아래쪽을 꾸밀 때도 따라온다).
   펼친 칸은 오른쪽 칸(옆 메뉴) 위에 띄워서 카드를 가리지 않는다. */
@media (min-width: 861px) {
  .news-tools { grid-column: 1 / -1; grid-row: 1; position: sticky; top: 76px; z-index: 5; }
  .news-editor.has-tools .news-left, .news-editor.has-tools .news-right { grid-row: 2; }
  /* 템플릿을 넣은 뒤 카드나 옆 메뉴를 보이는 곳으로 데려올 때, 위에 붙어 있는 머리말과 도구 막대 아래에 오게 한다(minicanva.css). */
  .news-editor.has-tools { --fe-scroll-top: 150px; }
  /* 화면이 낮아도(크롬북 등) 도구 막대와 카드 한 장이 함께 보이게 카드 크기를 맞춘다. */
  .news-editor.has-tools .news-stage { max-width: min(460px, calc(100vh - 170px)); }
}
/* 두 칸이지만 넓지 않은 화면(가로로 둔 태블릿 등): 텍스트의 도구는 두 줄이 될 수 있다. 무엇을 고르든 높이가 같도록 두 줄 자리를 늘 잡아 둔다. */
@media (min-width: 861px) and (max-width: 1099px) {
  .fe-bar { min-height: 92px; align-content: flex-start; }
  .news-editor.has-tools .news-stage { max-width: min(460px, calc(100vh - 212px)); }
  .news-editor.has-tools { --fe-scroll-top: 192px; }
}
/* 화면이 충분히 높으면: 도구 칸을 길게 내려도 카드가 따라오게 왼쪽 칸도 붙여 둔다(화면 높이에 맞춰 카드 크기도 줄인다). */
@media (min-width: 861px) and (min-height: 700px) {
  .news-left { position: sticky; top: 84px; }
  .news-editor.has-tools .news-left { top: 146px; }
  .news-stage { max-width: min(460px, calc(100vh - 360px)); }
  .news-editor.has-tools .news-stage { max-width: min(460px, calc(100vh - 420px)); }
}
@media (min-width: 861px) and (max-width: 1099px) and (min-height: 700px) {
  .news-editor.has-tools .news-left { top: 188px; }
  .news-editor.has-tools .news-stage { max-width: min(460px, calc(100vh - 462px)); }
}
@media (min-width: 1500px) and (min-height: 700px) {
  .news-stage { max-width: min(560px, calc(100vh - 360px)); }
  .news-editor.has-tools .news-stage { max-width: min(560px, calc(100vh - 420px)); }
}
@media (prefers-reduced-motion: reduce) {
  .digital .work-card.uploaded, .robot-face.run .antenna { animation: none; }
}
.lc-cell{position:relative}
.lc-cell.h1::after,.lc-cell.h2::after,.lc-cell.h3::after{content:'';position:absolute;right:-2px;top:-2px;width:6px;height:6px;border-radius:50%;background:#f0b400;box-shadow:0 0 0 1px #fff}
.lc-cell.h3::after{background:#e03131}
.lc-hint-chip{margin-left:6px;padding:1px 7px;border-radius:999px;background:var(--warn-soft);font-size:.8rem;font-weight:800}
.lc-hint-chip.h3{background:var(--bad-soft);color:var(--bad)}
.lc-peek-line{margin:4px 0 0;font-size:.92rem}
.lc-checks{display:flex;gap:4px}
.lc-checks span{min-width:34px;text-align:center;padding:1px 5px;border-radius:7px;background:#edf0f2;color:#868e96;font-size:.82rem;font-weight:800}
.lc-checks span.ok{background:#fff3bf;color:#b7791f}
.lc-checks span.try{background:var(--warn-soft);color:#b7791f}
/* 📣 꽃길 코딩 수업 모드 */
.lc-control{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 12px;padding:12px 14px}
.lc-pick{min-height:38px;border-radius:10px;padding:0 8px;font:inherit}
.lc-open{display:inline-flex;align-items:center;gap:5px;font-size:.92rem}
.lc-control-note{flex-basis:100%;font-size:.86rem}
.lc-focus{margin:0 0 12px;padding:14px 16px;display:grid;gap:12px;border:3px solid #f0b400}
.lc-focus-title{margin:0;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.lc-focus-title span{padding:2px 10px;border-radius:999px;background:#fff3bf;font-size:.9rem}
.lc-focus-title b{font-size:1.4rem;color:var(--primary-dark)}
.lc-focus-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.lc-focus-stats div{display:grid;justify-items:center;padding:8px;border-radius:12px;background:var(--soft)}
.lc-focus-stats b{font-size:2rem;line-height:1.1;font-variant-numeric:tabular-nums}
.lc-focus-stats span{font-size:.88rem;font-weight:800;color:var(--muted)}
.lc-focus-stats .done b{color:#2f9e44}.lc-focus-stats .stuck b{color:var(--bad)}.lc-focus-stats .three b{color:#b7791f}
.lc-focus-grid{display:flex;flex-wrap:wrap;gap:6px}
.lc-chip{display:inline-flex;align-items:center;gap:4px;padding:5px 10px;border-radius:999px;background:#edf0f2;color:#495057;font-weight:700;font-size:.95rem}
.lc-chip i{font-style:normal;color:#b7791f;font-size:.85em}
.lc-chip.done{background:#d3f9d8;color:#2b8a3e}.lc-chip.trying{background:var(--warn-soft)}.lc-chip.stuck{background:var(--bad-soft);color:var(--bad)}
body.gb-tv .lc-focus-title b{font-size:2.4rem}
body.gb-tv .lc-focus-stats b{font-size:3.4rem}
body.gb-tv .lc-focus-stats span{font-size:1.2rem}
body.gb-tv .lc-chip{font-size:1.3rem;padding:8px 14px}
@media (max-width:640px){.lc-focus-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
.lc-gardens{margin-top:8px}
.lc-garden-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px}
.lc-garden{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;align-items:center;padding:10px 12px;border-radius:12px;background:#fff;box-shadow:var(--shadow)}
.lc-garden.star{background:#fff9db}
.lc-garden .lc-star{grid-row:span 3;font-size:1.6rem;background:none;border:0;cursor:pointer;line-height:1}
.lc-garden span{font-size:.88rem}

