/* 포켓클래스 만족도 조사 — 학습자 화면. 색은 잡스택(아카이브 브랜드 블루)과 같은 계열 */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --ink: #17191c;
  --muted: #6b7280;
  --border: #e4e7ec;
  --accent: #526bee;
  --accent-ink: #3f53d8;
  --accent-soft: #eef1ff;
  --ok: #047857;
  --warn: #b45309;
  --bad: #dc2626;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--accent-ink); }
button, input, textarea { font: inherit; color: inherit; }
:is(a, button, input, textarea):focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }

.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.brand {
  display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
}
.top-in { max-width: 960px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* 상단 바로가기 — 홈페이지·카카오톡 채널·유튜브·문의(2026-10-15 사용자). 휴대폰에서는 글자를 빼고 아이콘만 */
.top-links { display: flex; align-items: center; gap: 6px; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.pill:hover { border-color: var(--accent); color: var(--accent-ink); }
.call-num { color: var(--muted); font-weight: 500; }
.icon-link { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.icon-link:hover { filter: brightness(.95); }
.kakao { background: #fee500; }
.youtube { background: #ff0000; }
@media (max-width: 900px) { .call-num { display: none; } }
@media (max-width: 560px) {
  .pill-label { display: none; }
  .pill { width: 34px; padding: 0; justify-content: center; }
  .top-links { gap: 5px; }
  .brand { font-size: 16px; gap: 8px; white-space: nowrap; }
}
@media (max-width: 360px) {
  .brand { font-size: 14.5px; gap: 6px; }
  .top-in { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .top-links { gap: 4px; } .pill, .icon-link { width: 30px; height: 30px; }
}
.brand-mark { width: 34px; height: 34px; object-fit: contain; flex: none; }   /* 포켓클래스 로고(배경 없음) */
.wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 64px; }

/* 안내 배너 — 포켓클래스 로고 파랑 */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px;
  margin: 4px 0 22px; padding: 26px 28px; border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, #1d4aa8 0%, #2f6fd6 60%, #4f9be8 100%);
}
.hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgb(255 255 255 / 8%); }
.hero-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.hero h1 { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.02em; }
.hero p { margin: 0; color: rgb(255 255 255 / 88%); max-width: 640px; }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgb(255 255 255 / 16%); font-size: 14px; font-weight: 600; }
.steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #1d4aa8; font-size: 12.5px; }
.hero-poby { position: relative; z-index: 1; flex: none; width: 180px; height: auto; filter: drop-shadow(0 8px 16px rgb(0 0 0 / 18%)); }
@media (max-width: 640px) {
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 20px; }
  .hero-poby { position: absolute; right: -14px; bottom: -10px; width: 96px; opacity: .9; }
  .hero-text { padding-right: 60px; }
}
/* 참여 안내 */
.guide { margin-top: 28px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.guide h2 { margin: 0 0 10px; font-size: 16px; }
.guide ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.guide li { display: flex; gap: 10px; align-items: flex-start; }
.guide-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); font-size: 18px; }
.guide b { font-size: 14px; }
.guide p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
@media (max-width: 760px) { .guide ul { grid-template-columns: 1fr; } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit;
  transition: box-shadow 120ms ease, transform 120ms ease;
}
.card:hover { box-shadow: 0 6px 20px rgb(16 24 40 / 8%); transform: translateY(-1px); }
.card-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #eef1ff, #e6f4fe); display: grid; place-items: center; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img span { padding: 0 18px; text-align: center; color: var(--accent-ink); font-weight: 700; font-size: 15px; }
.card-body { padding: 12px 14px 14px; }
.card-body h2 { margin: 0 0 6px; font-size: 16px; line-height: 1.45; }
.meta { color: var(--muted); font-size: 13px; }

.back { display: inline-flex; gap: 4px; margin-bottom: 10px; font-size: 14px; text-decoration: none; }
.detail h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; line-height: 1.4; }
.player { margin: 14px 0 8px; background: #000; border-radius: var(--radius); overflow: hidden; }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.pages { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.pages button {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; cursor: pointer; color: var(--muted);
}
.pages button[aria-pressed='true'] { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; font-weight: 700; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-top: 14px; }
.panel h2 { margin: 0 0 10px; font-size: 16px; }
/* 제작 포인트 */
.points h2 { margin-bottom: 2px; }
.points > .hint { margin: 0 0 14px; }
.point-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .point-list { grid-template-columns: 1fr; } }
.point { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70px); }
.point-head { display: flex; align-items: center; gap: 12px; }
.point-head p { margin: 0; font-weight: 600; }
.point-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); font-size: 21px; font-weight: 800; color: var(--accent-ink);
  box-shadow: 0 1px 2px rgb(23 25 28 / 6%);
}
.point-shots { display: grid; grid-template-columns: 1fr; margin-top: auto; padding-top: 12px; gap: 10px; }
.shot { margin: 0; }
.shot > button { display: block; width: 100%; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.shot > button :is(img, video) { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot figcaption { font-size: 13px; color: var(--muted); padding: 6px 2px 0; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }

.form { display: grid; gap: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.hint.pin { color: var(--accent-ink); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.btn {
  padding: 10px 22px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font-weight: 700; cursor: pointer;
}
.btn:disabled { opacity: 0.55; cursor: wait; }
.msg { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.msg.ok { background: #ecfdf5; color: var(--ok); }
.msg.warn { background: #fffbeb; color: var(--warn); }
.msg.bad { background: #fef2f2; color: var(--bad); }

.comments { list-style: none; margin: 0; padding: 0; }
.comment { padding: 12px 0; border-top: 1px solid var(--border); }
.comment:first-child { border-top: none; padding-top: 0; }
.comment-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 13.5px; }
.comment-head b { font-size: 14px; }
.comment-body { margin: 4px 0 0; white-space: pre-wrap; }
.ts { padding: 0 2px; border: none; background: none; color: var(--accent-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.reply { margin: 8px 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: 14px; }
.reply .tag { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; }
.empty, .loading { color: var(--muted); padding: 24px 0; text-align: center; }

.lightbox { position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / 82%); display: grid; place-items: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox :is(img, video) { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgb(255 255 255 / 15%); color: #fff; font-size: 18px; cursor: pointer; }

@media (max-width: 560px) {
  .wrap { padding: 14px 16px 48px; }
  .form-row { grid-template-columns: 1fr; }
  .lead h1, .detail h1 { font-size: 19px; }
  .panel { padding: 14px; }
  .player { margin-left: -16px; margin-right: -16px; border-radius: 0; }
}

/* 의견 수정·삭제 (2026-10-13) */
.link-btn { margin-left: auto; padding: 0; border: none; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--accent-ink); }
.edit-box { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); display: grid; gap: 8px; }
.edit-box textarea { width: 100%; min-height: 80px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); resize: vertical; line-height: 1.6; }
.edit-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.edit-row input { width: 140px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
.btn-line { background: var(--surface); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }

/* 목록 카드 의견 수 — 말풍선 (2026-10-15) */
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bubble { display: inline-flex; align-items: center; gap: 2px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 우수평가 선정 의견 */
.comment.awarded {
  border: 2px solid #f2c94c; border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px;
  background: linear-gradient(180deg, #fff9e6, var(--surface) 80px);
}
.award-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; padding: 2px 10px; border-radius: 999px;
  background: #fdecb3; color: #8a5a00; font-size: 13px; font-weight: 700;
}
