/* 팀캐 확정 룩: 네온 다크 + 라임 + 주아 단일 폰트 + 스티커 외곽선.
   색은 bg / accent / ink / white 네 가지만(tint는 캐릭터 그림 안에서만). */
:root {
  --bg: #15112b;
  --accent: #c6ff3d;
  --ink: #17142b;
  --white: #fff;
  --tint: #4a3c9a;
  --glow: 0 0 14px #c6ff3d88;
  --track: #ffffff26;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: 'Jua', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 19px;
  line-height: 25px;
  font-weight: 400;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- 화면 틀 ---------- */
.screen {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 22px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 8px; }
.main { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 12px 0 20px; }
.main.center { justify-content: center; align-items: center; text-align: center; }
.foot { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* ---------- 글자 ---------- */
.logo {
  display: inline-block; font-size: 38px; line-height: 38px; color: var(--accent);
  text-shadow: var(--glow); transform: rotate(-3deg); -webkit-text-stroke: 0.6px var(--accent);
}
.display { font-size: 62px; line-height: 62px; margin: 0; color: var(--accent); text-shadow: var(--glow); -webkit-text-stroke: 0.8px var(--accent); }
.title { font-size: 40px; line-height: 44px; margin: 0; color: var(--ink); -webkit-text-stroke: 0.6px var(--ink); }
.headline, .display { white-space: pre-line; }
.headline { font-size: 34px; line-height: 37px; margin: 0; color: var(--white); -webkit-text-stroke: 0.6px var(--white); }
.headline .hl { color: var(--accent); text-shadow: var(--glow); -webkit-text-stroke-color: var(--accent); }
.body { font-size: 19px; line-height: 25px; margin: 0; }
.caption { font-size: 17px; line-height: 20px; margin: 0; }
.micro { font-size: 15px; line-height: 20px; margin: 0; }
.dim { opacity: 0.78; }
.center-text { text-align: center; }

/* ---------- 버튼 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 60px;
  border: 3px solid var(--ink); border-radius: 18px; background: var(--accent); color: var(--ink);
  font-size: 25px; line-height: 25px; -webkit-text-stroke: 0.5px var(--ink);
  box-shadow: 0 5px 0 var(--accent); margin-bottom: 5px; transition: transform 0.06s, box-shadow 0.06s;
}
.btn.sub { height: 58px; background: var(--white); }
.btn:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent); }
.btn[disabled] { opacity: 0.45; box-shadow: none; cursor: default; }
.linkbtn {
  background: none; border: 0; padding: 10px; color: var(--white); font-size: 19px; line-height: 25px;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; align-self: center;
}

/* ---------- 알약 ---------- */
.pill {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border: 3px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink);
  font-size: 15px; line-height: 20px; white-space: nowrap;
}
.pill.lime { background: var(--accent); box-shadow: 0 3px 0 var(--accent); }
button.pill { height: 40px; font-size: 17px; margin-bottom: 3px; }
button.pill:active { transform: translateY(2px); }

/* ---------- 카드 ---------- */
.card {
  background: var(--white); color: var(--ink); border: 4px solid var(--ink); border-radius: 28px;
  box-shadow: 0 6px 0 var(--accent); padding: 22px; margin-bottom: 6px;
}
.card.center-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.card .caption { opacity: 0.8; }
.card .dash { border: 0; border-top: 2px dashed #17142b55; margin: 12px 0; width: 100%; }
.panel { background: #ffffff14; border-radius: 22px; padding: 16px; }

/* ---------- 응답 보기(가로 4칸) ---------- */
.scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.opt {
  height: 78px; padding: 4px; display: flex; align-items: center; justify-content: center; text-align: center;
  border: 3px solid var(--ink); border-radius: 18px; background: var(--white); color: var(--ink);
  font-size: 17px; line-height: 20px; box-shadow: 0 4px 0 var(--accent); margin-bottom: 4px;
}
.opt[aria-pressed='true'] { background: var(--accent); transform: translateY(3px); box-shadow: 0 1px 0 var(--accent); }
.scale-note { min-height: 20px; text-align: center; color: var(--accent); }
.question { font-size: 28px; line-height: 38px; margin: 0; -webkit-text-stroke: 0.4px var(--white); }

.bigopts { display: flex; flex-direction: column; gap: 14px; }
.bigopts .opt { height: 64px; font-size: 25px; line-height: 25px; }

/* ---------- 진행 ---------- */
.bar { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.2s; }
.dots { display: flex; gap: 12px; justify-content: center; }
.dot { width: 28px; height: 28px; border-radius: 50%; border: 3px dashed var(--white); }
.dot.on { background: var(--accent); border: 3px solid var(--ink); box-shadow: 0 0 0 2px var(--accent); }

/* ---------- 입력 ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.input {
  width: 100%; height: 60px; padding: 0 18px; border: 3px solid var(--ink); border-radius: 18px;
  background: var(--white); color: var(--ink); font-size: 25px; box-shadow: 0 5px 0 var(--accent); margin-bottom: 5px;
}
.input::placeholder { color: #17142b99; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  height: 48px; padding: 0 18px; border: 3px solid var(--ink); border-radius: 999px; background: var(--white);
  color: var(--ink); font-size: 19px; box-shadow: 0 3px 0 var(--accent); margin-bottom: 3px;
}
.choice[aria-pressed='true'] { background: var(--accent); transform: translateY(2px); box-shadow: 0 1px 0 var(--accent); }

.linkbox {
  background: #ffffff14; border: 2px dashed #ffffff66; border-radius: 18px; padding: 14px;
  font-size: 17px; line-height: 22px; user-select: all; -webkit-user-select: all;
}
.qr { background: var(--white); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--accent); padding: 10px; align-self: center; margin-bottom: 6px; }
.qr svg { display: block; width: 220px; height: 220px; }

/* ---------- 지표 막대 / 비교 ---------- */
.metric { display: flex; flex-direction: column; gap: 6px; }
.metric + .metric { margin-top: 14px; }
.metric-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.line { display: grid; grid-template-columns: 40px 1fr 44px; align-items: center; gap: 8px; }
.line .track { height: 12px; border-radius: 6px; background: var(--track); overflow: hidden; }
.line .fill { display: block; height: 100%; border-radius: 6px; background: var(--white); }
.line.friend .fill { background: var(--accent); }
.line .num { text-align: right; }

.cmp { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 22px; background: #ffffff14; }
.cmp .cmp-label { color: var(--accent); }
.note { padding: 14px 16px; border-radius: 22px; background: #ffffff14; }

.scene { display: flex; gap: 10px; align-items: flex-start; }
.scene + .scene { margin-top: 10px; }
.scene b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-weight: 400; font-size: 17px; }

/* ---------- 얼굴, 토스트 ---------- */
.face { display: block; }
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100vw - 44px); padding: 10px 18px; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--accent); color: var(--ink); box-shadow: 0 4px 0 var(--white); z-index: 10;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
