/* 포켓클래스 콘텐츠 만족도평가 — 학습자 화면. 색은 잡스택(아카이브 브랜드 블루)과 같은 계열 */
: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 {
  max-width: 960px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, #7468f6, #526bee 55%, #69c0fb); color: #fff; font-weight: 800; font-size: 14px;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 64px; }

.lead { margin: 4px 0 20px; }
.lead h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.lead p { margin: 0; color: var(--muted); }
.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; }
.intro p { margin: 0 0 8px; }
.intro ul { margin: 0 0 8px; padding-left: 20px; }
.intro li { margin: 3px 0; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.shots button { padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.shots img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.shots figcaption { font-size: 12.5px; color: var(--muted); padding: 4px 2px 0; }

.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 img { 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; }
}
