/* ---- CSAT cheer page (main) ---- */
.cheer {
  position: relative; overflow: hidden; background: #f8f8f8;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr; justify-items: center;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  color: #111;
}
.tableview .cheer { display: none; }
.ch-head { grid-row: 1; padding: 18px 16px 0; text-align: center; }
.ch-sig { font-family: 'Hedvig Letters Serif', ui-serif, Georgia, serif; font-weight: 700; font-size: clamp(28px, 4.2vw, 42px); -webkit-text-stroke: .6px #111; letter-spacing: -.01em; }

.step { display: none; grid-row: 2; align-self: center; width: min(780px, 100%); padding: 0 20px clamp(110px, 22vh, 200px); text-align: center; position: relative; z-index: 2; }
.step.show { display: block; animation: stepIn .5s ease both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ask { margin: 0 0 14px; font-size: clamp(20px, 3.4vw, 32px); line-height: 1.45; font-weight: 700; letter-spacing: -.02em; }
.ask .sm { display: none; }
.sub { margin: 0 0 34px; font-size: clamp(11px, 1.6vw, 14px); color: #555; }
.pills { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.pills input { width: clamp(150px, 22vw, 190px); padding: 15px 26px; border: 0; border-radius: 999px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.2); font: 500 18px/1.2 inherit; color: #111; text-align: center; outline: none; -webkit-appearance: none; }
.pills input:last-of-type { width: clamp(200px, 28vw, 250px); }
.pills input::placeholder { color: #bdbdbd; }
.pills input:focus { box-shadow: 0 4px 14px rgba(255,90,0,.35), 0 0 0 2px #ff7a1a; }
.go { width: 52px; height: 52px; border: 0; border-radius: 50%; background: #111; color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.go:active { transform: scale(.94); }
.err { min-height: 20px; margin: 14px 0 0; color: #d02b1c; font-size: 13px; }
.note { margin: 4px 0 0; color: #9a9a9a; font-size: 12px; }

.who { font-size: clamp(14px, 2vw, 18px); font-weight: 600; margin: 0 0 clamp(28px, 6vh, 54px); }
.metric { margin: 0 0 clamp(20px, 4vh, 34px); font-size: clamp(22px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.bar { position: relative; width: min(440px, 82vw); height: 62px; margin: 0 auto; border-radius: 999px; background: #ccc; box-shadow: 0 4px 10px rgba(0,0,0,.28); }
.fill { position: absolute; left: 0; top: 0; height: 100%; min-width: 8%; border-radius: 999px; background: linear-gradient(90deg, #f00, #ff6a00); box-shadow: 0 4px 10px rgba(0,0,0,.3); display: flex; align-items: center; padding-left: 18px; color: #fff; font-weight: 800; font-size: 16px; white-space: nowrap; }
.bar.boom .fill { width: 320vw !important; transition: width 1.2s cubic-bezier(.2,.8,.2,1); animation: shake .25s linear 4; }
@keyframes shake { 0%,100% { transform: translateY(0); } 25% { transform: translateY(-3px); } 75% { transform: translateY(3px); } }

.card { margin: 0 auto; width: min(560px, 100%); padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px); background: #fff; border-radius: 44px; box-shadow: 0 12px 40px rgba(0,0,0,.16); text-align: center; }
.cong { margin: 0 0 22px; font-size: clamp(20px, 3.2vw, 26px); line-height: 1.4; font-weight: 800; }
.res { margin: 0 0 22px; font-size: clamp(15px, 2.4vw, 19px); font-weight: 700; line-height: 1.4; }
.res b { color: #ff6a00; font-size: 1.15em; white-space: nowrap; }
.card .body { text-align: left; }
.card .body p { margin: 0 0 12px; font-size: clamp(12.5px, 1.8vw, 14px); line-height: 1.75; color: #222; word-break: keep-all; }
.sign { margin: 20px 0 0; font-size: clamp(16px, 2.6vw, 20px); font-weight: 700; line-height: 1.8; }
.sign strong { font-size: 1.5em; }
.sign .serif { font-family: 'Hedvig Letters Serif', ui-serif, Georgia, serif; font-size: 1.15em; -webkit-text-stroke: .5px #111; }
.actions { margin-top: 20px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.act { padding: 11px 20px; border-radius: 999px; border: 1px solid #cfcfcf; background: #fff; color: #222; font: 600 14px/1 inherit; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.act.pri { background: #111; border-color: #111; color: #fff; }
.act:active { transform: scale(.97); }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 5; }

button.more { all: unset; box-sizing: border-box; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 16px 4px; cursor: pointer; color: #666; font: 600 13px/1.2 system-ui, -apple-system, 'Segoe UI', 'Apple SD Gothic Neo', sans-serif; letter-spacing: .02em; text-align: center; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
button.more:hover { color: #111; }
button.more:focus-visible { outline: 2px solid #111; outline-offset: 2px; border-radius: 8px; }
.more-t { margin-bottom: 4px; }
.more-t em { font-style: normal; font-weight: 500; color: #999; }
.more i { display: block; width: 10px; height: 10px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: bob 1.4s ease-in-out infinite; }
.more i + i { animation-delay: .18s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(5px) rotate(45deg); } }

/* ---- Why section (below, revealed by scrolling) ---- */
body:not(.tableview) main { height: auto; min-height: 90vh; min-height: 90svh; padding-top: 48px; padding-bottom: 28px; justify-content: space-between; gap: 28px; }
body:not(.tableview) .links { flex: 0 0 auto; margin: auto 0; }

/* ---- overlays ---- */
.ov { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.42); padding: 12px; font-family: system-ui, -apple-system, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; }
.ov[hidden] { display: none; }
.ovbox { background: #fff; border-radius: 16px; padding: 18px; width: min(920px, 100%); max-height: 88vh; max-height: 88svh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.ovbox.sm { width: min(320px, 100%); gap: 10px; }
.ovbox h4 { margin: 0 0 4px; font-size: 17px; }
.ovhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ovbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.ovnote { margin: 4px 0 10px; font-size: 12px; color: #888; }
.tbl { overflow: auto; border: 1px solid #e5e5e5; border-radius: 10px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 13px; white-space: nowrap; }
.tbl th, .tbl td { padding: 8px 12px; border-bottom: 1px solid #eee; text-align: left; }
.tbl th { position: sticky; top: 0; background: #f4f4f4; font-weight: 700; }
.tbl td.empty { text-align: center; color: #999; padding: 28px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: #111; color: #fff; padding: 11px 18px; border-radius: 999px; font: 600 13px system-ui, sans-serif; z-index: 200; transition: .3s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- mobile ---- */
@media (max-width: 640px) {
  body:not(.tableview) main { min-height: 0; gap: 36px; justify-content: flex-start; padding-top: 36px; }
  .ask .sm { display: inline; }
  .ask { font-size: 20px; }
  .pills { flex-direction: column; gap: 12px; }
  .pills input, .pills input:last-of-type { width: min(300px, 82vw); font-size: 17px; }
  .go { width: min(300px, 82vw); height: 50px; border-radius: 999px; font-size: 18px; }
  .step { padding-bottom: 90px; }
        .card { border-radius: 30px; }
  .bar { height: 54px; }
  .fill { font-size: 14px; padding-left: 14px; }
  .actions { gap: 8px; }
  .act { padding: 11px 16px; }
  .ovbox { padding: 14px; }
  body:not(.tableview) .links { grid-template-columns: 1fr; gap: 6px; margin: 0; }
  body:not(.tableview) .links img, body:not(.tableview) .wl { max-width: 84vw; }
  .wl { font-size: clamp(34px, 11vw, 48px); }
}
@media (max-width: 380px) { .ask { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { .step.show { animation: none; } .more i { animation: none; } }

#stepResult { padding-bottom: clamp(70px, 10vh, 110px); }

@media (max-width: 640px) { .cheer #stepResult { padding-bottom: 70px; } }

.unlock { z-index: 150; }
.undobar { z-index: 140; }

.evh { margin: 18px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { background: #f1f1f1; border-radius: 999px; padding: 5px 11px; font-size: 12px; }
.chip b { margin-left: 4px; }
.ovbox { overflow: auto; }

/* result screen: sized by --s so card + buttons fit one screen (cheer.js fitResult) */
#stepResult { --s: 1; }
#stepResult .card { font-size: calc(16px * var(--s)); width: min(640px, 100%); padding: 1.9em 2.1em; border-radius: 2.5em; }
#stepResult .cong { font-size: 1.6em; margin: 0 0 .8em; }
#stepResult .res { font-size: 1.2em; margin: 0 0 .9em; }
#stepResult .card .body p { font-size: .9em; margin: 0 0 .6em; line-height: 1.7; }
#stepResult .sign { font-size: 1.25em; margin: .9em 0 0; line-height: 1.7; }
#stepResult .actions { margin-top: calc(16px * var(--s)); gap: calc(10px * var(--s)); }
#stepResult .act { font-size: calc(14px * var(--s)); padding: calc(11px * var(--s)) calc(20px * var(--s)); }
.cheer #stepResult { padding-bottom: 64px; }
@media (max-width: 640px) { .cheer #stepResult { padding-bottom: 64px; padding-left: 12px; padding-right: 12px; } #stepResult .card { padding: 1.5em 1.3em; } }

/* feedback */
.feedback { width: min(520px, 100%); text-align: center; font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif; }
.feedback h3 { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: #222; }
.feedback form { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.feedback textarea { width: 100%; padding: 12px 14px; border: 1px solid #d5d5d5; border-radius: 14px; font: 400 14px/1.5 inherit; resize: vertical; min-height: 84px; background: #fff; color: #111; outline: none; box-sizing: border-box; }
.feedback textarea:focus { border-color: #111; }
.fbmsg { min-height: 18px; margin: 8px 0 0; font-size: 13px; color: #2b8a3e; }
td.wrap { white-space: normal !important; min-width: 240px; max-width: 420px; }
