/* ROGA ROAD — 공용 스타일 (모바일 우선) */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --ink: #15202b;
  --ink-2: #46525f;
  --ink-3: #8a94a0;
  --line: #e3e7ec;
  --bg: #f4f6f8;
  --card: #ffffff;
  --accent: #ff6b2c;      /* 로가로드 도로표지 오렌지 */
  --accent-ink: #ffffff;
  --ok: #138a4e;
  --warn: #c98500;
  --bad: #c8321e;
  --naver: #03c75a;
  --daangn: #ff6f0f;
  --kakao: #fee500;
  --kakao-ink: #191600;
  --r: 14px;
}

* { 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, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;
}
a { color: inherit; }

.top {
  background: var(--ink);
  color: #fff;
  padding: 14px 16px;
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { font-weight: 800; letter-spacing: .02em; font-size: 17px; }
.brand b { color: var(--accent); }
.top small { color: #b8c2cc; font-size: 12px; }

.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 120px; }

.hero h1 { font-size: 24px; line-height: 1.3; margin: 8px 0 6px; }
.hero p { color: var(--ink-2); margin: 0 0 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 16px;
  margin: 0 0 14px;
}
.card h2 { font-size: 18px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.card .sub { color: var(--ink-3); font-size: 13px; margin: 0 0 14px; }

.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.tag.naver { background: var(--naver); color: #fff; }
.tag.daangn { background: var(--daangn); color: #fff; }
.tag.kakao { background: var(--kakao); color: var(--kakao-ink); }

label.f { display: block; font-weight: 600; font-size: 14px; margin: 0 0 12px; }
label.f > input, label.f > select, label.f > textarea { display: block; margin-top: 6px; }
label.f .req { color: var(--bad); }
input[type=text], input[type=tel], input[type=email], input[type=url], select, textarea {
  width: 100%; font: inherit; font-weight: 400;
  padding: 12px; border: 1px solid #cfd6dd; border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }

/* 채점 문항 */
.q { border-top: 1px dashed var(--line); padding: 12px 0 4px; }
.q:first-of-type { border-top: 0; padding-top: 0; }
.q .qt { font-weight: 700; font-size: 15px; margin: 0 0 2px; }
.q .qh { color: var(--ink-3); font-size: 12.5px; margin: 0 0 8px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  text-align: center; padding: 10px 4px; border: 1px solid #cfd6dd; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer; background: #fff; user-select: none;
}
.seg input:checked + label { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg input:focus-visible + label { outline: 2px solid var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label {
  padding: 8px 12px; border: 1px solid #cfd6dd; border-radius: 99px; font-size: 14px; cursor: pointer; background: #fff;
}
.chips input:checked + label { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

.score-pill { margin-left: auto; font-size: 14px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--bg); }

/* 점수 요약 바 (하단 고정) */
.scorebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: #fff; border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.scorebar .in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.scorebar .s { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 10px; font-size: 13px; color: var(--ink-2); }
.scorebar .s b { color: var(--ink); }
.scorebar .total { margin-left: auto; text-align: right; }
.scorebar .total strong { font-size: 22px; }

.grade { font-weight: 800; }
.grade.bad { color: var(--bad); } .grade.warn { color: var(--warn); } .grade.ok { color: var(--ok); }

.consent {
  max-height: 220px; overflow: auto; font-size: 13px; color: var(--ink-2);
  background: var(--bg); border-radius: 10px; padding: 12px; margin: 0 0 10px;
}
.consent table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.consent th, .consent td { border: 1px solid var(--line); padding: 6px; text-align: left; vertical-align: top; background: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 14px; margin: 8px 0; }
.check input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0; accent-color: var(--accent); }

.btn {
  display: block; width: 100%; border: 0; border-radius: 12px; padding: 16px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 800; font-size: 17px; cursor: pointer;
  text-align: center; text-decoration: none;
}
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.msg { font-weight: 700; margin: 12px 0 0; }
.msg.ok { color: var(--ok); } .msg.err { color: var(--bad); }

.note { font-size: 13px; color: var(--ink-2); background: #fff8f2; border: 1px solid #ffd9c4; border-radius: 10px; padding: 10px 12px; }

/* 초대 가이드 */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 14px; position: sticky; top: 52px; z-index: 5; background: var(--bg); padding: 6px 0; }
.tabs button {
  font: inherit; font-weight: 800; font-size: 14px; padding: 12px 4px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; background: #fff;
}
.tabs button[aria-selected=true] { border-color: var(--ink); }
.tabs .t-naver { color: var(--naver); } .tabs .t-daangn { color: var(--daangn); } .tabs .t-kakao { color: #8a7a00; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 16px 46px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.steps li b.menu { background: #eef1f4; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.copybox { display: flex; gap: 6px; align-items: center; margin: 6px 0 0; }
.copybox code { flex: 1; background: #eef1f4; padding: 10px; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.copybox button { font: inherit; font-weight: 700; font-size: 13px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--ink); background: #fff; cursor: pointer; }
.done { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.hidden { display: none !important; }
footer.f { text-align: center; color: var(--ink-3); font-size: 12px; padding: 20px 0; }
