/* SUPEREAL Goods Survey — 응답 화면 (휴대폰 우선, 외부 글꼴·라이브러리 없음) */
:root {
  --ink: #111111; --ink2: #3a3a3a; --muted: #7a7a7a; --line: #e7e7e2; --fill: #f3f3ef; --bg: #fafaf7; --card: #ffffff;
  --lime: #d4ff3a; --lime-ink: #1a1f00; --danger: #d6452f; --ok: #1f9d55;
  --radius: 16px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px -10px rgba(0,0,0,.12);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
  color: var(--ink); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
:lang(ja) body, body:lang(ja) { font-family: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; }
:lang(zh-Hans) body, body:lang(zh-Hans) { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(zh-Hant) body, body:lang(zh-Hant) { font-family: -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
:lang(th) body, body:lang(th) { font-family: -apple-system, Thonburi, "Leelawadee UI", Tahoma, "Noto Sans Thai", sans-serif; line-height: 1.7; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 상단 */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: var(--ink); color: #fff; }
.brand { display: flex; align-items: baseline; gap: 6px; letter-spacing: .02em; white-space: nowrap; flex: none; }
.lang { min-width: 0; }
.lang select { max-width: 130px; }
.brand b { font-size: 18px; font-weight: 900; }
.brand span { font-size: 18px; font-weight: 400; color: var(--lime); }
.lang { margin-left: auto; }
.lang select { height: 34px; border-radius: 9999px; border: 1px solid #444; background: #1d1d1d; color: #fff; padding: 0 30px 0 12px; font-size: 13px;
  appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #bbb 50%), linear-gradient(135deg, #bbb 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }

/* 본문 */
main { max-width: 640px; margin: 0 auto; padding: 20px 16px 120px; }
.loading { display: flex; justify-content: center; padding: 80px 0; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
h1 { font-size: 28px; line-height: 1.25; margin: 8px 0 12px; letter-spacing: -.01em; }
h2 { font-size: 22px; line-height: 1.3; margin: 4px 0 6px; }
.lead { color: var(--ink2); margin: 0 0 16px; }
.muted { color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 9999px; background: var(--fill); color: var(--ink2); }
.badge.lime { background: var(--lime); color: var(--lime-ink); }
.badge.test { background: #ffe9a8; color: #6b4b00; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.hero { background: var(--ink); color: #fff; border-radius: 22px; padding: 26px 22px; margin-bottom: 16px; position: relative; overflow: hidden; }
.hero h1 { color: #fff; }
.hero .lead { color: #d6d6d6; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hero::after { content: ""; position: absolute; right: -36px; top: -36px; width: 92px; height: 92px; border-radius: 50%; background: var(--lime); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin-right: 44px; }
.teaser { display: flex; gap: 10px; align-items: flex-start; background: #f2ffd0; border-radius: 14px; padding: 12px 14px; font-size: 14px; color: #2b3300; margin: 0 0 16px; }
.teaser b { font-size: 18px; line-height: 1; }
.gift { display: flex; gap: 14px; align-items: center; background: #f2ffd0; border: 2px solid var(--lime); border-radius: 18px; padding: 14px; margin: 0 0 16px; }
.gc { flex: none; position: relative; width: 112px; aspect-ratio: 1.58; border-radius: 10px; padding: 8px 9px; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, #a6d13a 0%, #7fb42a 55%, #5f9420 100%); box-shadow: 0 8px 18px -8px rgba(60,90,10,.55); transform: rotate(-4deg); }
.gc::after { content: ""; position: absolute; right: -18px; bottom: -22px; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.18); }
.gc-brand { display: block; font-size: 11px; font-weight: 900; line-height: 1.05; letter-spacing: .04em; }
.gc-amt { position: absolute; left: 9px; bottom: 16px; font-size: 17px; font-weight: 900; letter-spacing: -.01em; }
.gc-tag { position: absolute; left: 9px; bottom: 5px; font-size: 8px; font-weight: 700; letter-spacing: .12em; opacity: .9; }
.gift-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gift-kick { font-size: 12px; font-weight: 700; color: #4d6b00; }
.gift-txt b { font-size: 17px; line-height: 1.3; color: var(--ink); }
.gift-txt span { font-size: 13px; line-height: 1.45; color: #4a5236; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; padding: 6px 0; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 24px; border-radius: 9999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 16px; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:disabled { opacity: 1; background: var(--ink); border-color: var(--ink); color: rgba(255,255,255,.45); cursor: default; }
.btn.lime { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.btn.block { width: 100%; }
.badge.dark { background: #2a2a2a; color: #d6d6d6; }
.center { text-align: center; }
.period { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; padding: 14px 16px; background: #1f1f1f; border: 1px solid #2e2e2e; border-radius: 16px; }
.period .p-lbl { font-size: 13px; color: #a9a9a9; }
.period b { font-size: 28px; line-height: 1.25; color: var(--lime); letter-spacing: -.01em; }
.period b span { white-space: nowrap; }
.period .p-tz { font-size: 12px; color: #a9a9a9; }
.peek-h { font-size: 17px; margin: 22px 0 10px; }
.peek { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.peek .thumb { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--fill); pointer-events: none; }
.peek .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg { text-align: center; padding: 48px 8px; }
.msg .big { font-size: 46px; line-height: 1; margin-bottom: 12px; }

/* 진행 표시 */
.progress { margin: 0 0 14px; }
.progress .bar { height: 6px; border-radius: 9999px; background: var(--fill); overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--ink); border-radius: 9999px; transition: width .3s; }
.progress .lbl { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 질문 */
.q { margin: 22px 0 10px; font-weight: 800; font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 16px; border-radius: 9999px; border: 1.5px solid var(--line); background: #fff; font-size: 15px; text-align: left; line-height: 1.3; }
.chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.chips.col { flex-direction: column; }
.chips.col .chip { border-radius: 14px; width: 100%; padding: 12px 16px; }
.select { width: 100%; height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; padding: 0 14px; font-size: 16px; }
.input { width: 100%; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; padding: 10px 14px; font-size: 16px; }
.input:focus, .select:focus { outline: none; border-color: var(--ink); }
.err { color: var(--danger); font-size: 14px; margin: 12px 0 0; display: flex; gap: 6px; }

/* 작품 고르기 */
.counter { position: sticky; top: 56px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg); padding: 10px 0; }
.counter b { font-size: 15px; }
.dots { display: flex; gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.work { position: relative; background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; border: 2px solid transparent; }
.work.on { border-color: var(--ink); }
.work .thumb { display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--fill); border: 0; padding: 0; }
.work .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work .t { padding: 8px 10px 4px; font-size: 13px; font-weight: 700; line-height: 1.35; min-height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.work .pick { margin: 4px 8px 10px; width: calc(100% - 16px); height: 38px; border-radius: 9999px; border: 1.5px solid var(--ink); background: #fff; font-weight: 700; font-size: 14px; }
.work.on .pick { background: var(--ink); color: #fff; }
.work .num { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* 작품 상세 (시트) */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet-in { background: var(--bg); width: 100%; max-width: 720px; height: 94vh; height: 94dvh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-head b { flex: 1; min-width: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--fill); font-size: 18px; flex: none; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.sheet-body > * { flex: none; }  /* 세로로 쌓인 페이지가 화면 높이에 맞춰 찌그러지지 않도록 */
.sheet-body img { width: 100%; height: auto; border-radius: 10px; display: block; background: var(--fill); }
.sheet-body img.loading-img { min-height: 160px; }
.sheet-body .desc { padding: 4px 4px 8px; color: var(--ink2); font-size: 15px; white-space: pre-line; }
.sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }

/* 상세 질문 */
.pc { margin-top: 14px; }
.pc-head { display: flex; gap: 12px; align-items: center; }
.pc-head img { width: 76px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; flex: none; background: var(--fill); }
.pc-head b { font-size: 16px; line-height: 1.3; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.seg .chip { border-radius: 12px; text-align: center; padding: 8px 6px; font-size: 14px; }
.price { background: var(--fill); border-radius: 14px; padding: 14px; }
.price .val { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; min-height: 30px; }
.price .val b { font-size: 24px; }
.price .val span { color: var(--muted); font-size: 14px; }
.price .hint { color: var(--muted); font-size: 14px; }
.price input[type=range] { width: 100%; height: 36px; margin: 0; accent-color: var(--ink); }
.price.unset input[type=range] { opacity: .45; }
.price.off input[type=range] { opacity: .2; pointer-events: none; }
.price .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.mini { font-size: 14px; }

/* 하단 고정 버튼 */
.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: linear-gradient(to top, var(--bg) 70%, rgba(250,250,247,0)); padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); }
.foot-in { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.foot.inline { position: static; background: none; padding: 14px 0 0; }  /* 첫 화면: 버튼을 내용 바로 아래에 */
.foot-in .btn.primary { flex: 1; }
.foot-in .btn[data-act="share"] { flex: none; padding: 0 16px; font-size: 14px; }
@media (max-width: 360px) { .share-lbl { display: none; } }

/* 완료 · 보상 */
.done-hero { text-align: center; padding: 24px 8px 8px; }
.done-hero .big { font-size: 52px; }
.reward { margin-top: 18px; border: 2px solid var(--ink); }
.reward h2 { display: flex; align-items: center; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink2); }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 9999px; font-size: 14px; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--shadow); }
