@import url("https://fonts.googleapis.com/css2?family=Unbounded:wght@700;900&display=swap");

:root {
  color-scheme: light;
  --blue: #3a46c8;
  --blue-deep: #2a3499;
  --blue-soft: #e8eaf8;
  --ink: #0c0c2e;
  --muted: #5d6187;
  --faint: #9a9cc2;
  --line: #dfe2f3;
  --paper: #f5f6fb;
  --mint: #dff9e7;
  --lime: #d8f27a;
  --coral: #ff775c;
  --violet: #6957ff;
  --ok: #00a86b;
  --warn: #f04452;
  --shadow: 0 20px 60px rgba(58, 70, 200, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  background: #ffffff;
  color: var(--ink);
  word-break: keep-all;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 6%, rgba(199, 255, 91, 0.24), transparent 24rem),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 36%);
}

/* -------- Header -------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(216, 224, 239, 0.8);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--blue);
  box-shadow: 0 10px 30px rgba(0, 100, 255, 0.24);
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a.on {
  color: var(--blue);
  background: var(--blue-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

a.ghost,
button.ghost {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 750;
  font-size: 14px;
  cursor: pointer;
}

a.primary,
button.primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--blue);
  padding: 11px 16px;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(0, 100, 255, 0.2);
  font-size: 14px;
}

a.primary:hover,
button.primary:hover {
  background: var(--blue-deep);
}

button.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-badge {
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  padding: 9px 14px;
  font-weight: 800;
  font-size: 14px;
}

.auth-badge--warn {
  background: #fff1ee;
  color: var(--warn);
}

main.site {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

main.site.narrow {
  width: min(520px, calc(100% - 32px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2a3499;
  background: #e9f2ff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
}

.section-title {
  margin: 44px 0 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title h2 {
  margin: 0;
  font-size: 28px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(31, 48, 82, 0.08);
}

footer.site {
  margin-top: 42px;
  padding: 26px 0 40px;
  color: var(--muted);
  line-height: 1.6;
  border-top: 1px solid var(--line);
}

footer.site .foot-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

/* -------- 용어 링크 (본문 중 전문용어 → 용어사전) -------- */
.term {
  color: var(--blue-deep);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  font-weight: 750;
}

/* -------- 인증 폼 -------- */
.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px;
  margin-top: 24px;
  background: white;
}

.auth-card h1 {
  font-size: 26px;
  margin: 0 0 6px;
}

.auth-card p.lead {
  margin: 0 0 24px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 800;
  font-size: 14px;
}

.field input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  font-size: 15px;
}

.field input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.field small {
  color: var(--faint);
  font-size: 12.5px;
}

.auth-submit {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  justify-content: center;
}

.auth-switch {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.auth-switch button {
  background: none;
  border: none;
  color: var(--blue-deep);
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: 14px;
}

.auth-msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  display: none;
}

.auth-msg.show {
  display: block;
}

.auth-msg.ok {
  background: var(--mint);
  color: #0a6b3f;
}

.auth-msg.err {
  background: #fff1ee;
  color: var(--warn);
}

.setup-hint {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* -------- 미션 패널 (index.html / week 페이지 공용) -------- */
.mp-empty {
  padding: 22px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  line-height: 1.6;
}

.mp-easy {
  display: grid;
  gap: 2px;
}

.mp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.mp-row:hover {
  background: var(--paper);
}

.mp-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
  flex: none;
}

.mp-pace {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
}

.mp-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 6px;
}

.mp-item:last-child {
  border-bottom: none;
}

.mp-note {
  margin: 0 0 8px 32px;
  color: var(--faint);
  font-size: 12.5px;
}

.mp-answer {
  margin: 4px 0 10px 32px;
  padding: 14px;
  border-radius: 8px;
  background: var(--paper);
  display: grid;
  gap: 12px;
}

.mp-field {
  display: grid;
  gap: 6px;
}

.mp-field label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--muted);
}

.mp-field input[type="text"],
.mp-field select,
.mp-field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: white;
  width: 100%;
}

.mp-field textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.5;
}

.mp-image-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mp-image-preview img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}

.mp-image-empty {
  color: var(--faint);
  font-size: 13px;
}

.mp-answer-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-big {
  margin-top: 18px;
  padding: 18px;
  border-radius: 8px;
  background: var(--paper);
}

.mp-big-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mp-big-head h4 {
  margin: 0;
  font-size: 16px;
}

.mp-desc {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.mp-big textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  background: white;
}

.mp-big button {
  margin-top: 10px;
}

.mp-save-msg {
  margin-left: 10px;
  font-size: 13px;
  font-weight: 800;
}

.mp-save-msg--ok {
  color: var(--ok);
}

.mp-save-msg--err {
  color: var(--warn);
}

.mp-badge {
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 800;
}

.mp-badge--done {
  background: var(--mint);
  border-color: transparent;
  color: #0a6b3f;
}

/* -------- 리더보드 -------- */
.rank-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.rank-table th,
.rank-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.rank-table th {
  background: var(--paper);
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}

.rank-table tr.me {
  background: var(--blue-soft);
}

.rank-num {
  font-weight: 900;
  color: var(--muted);
  width: 44px;
}

.rank-num.top1 { color: #e0a100; }
.rank-num.top2 { color: #9aa0ab; }
.rank-num.top3 { color: #c96a3e; }

/* -------- 용어 사전 -------- */
.glossary-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.glossary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 22px;
  background: white;
}

.glossary-item h3 {
  margin: 0 0 8px;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.glossary-item .term-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-deep);
  background: var(--blue-soft);
  padding: 4px 8px;
  border-radius: 999px;
}

.glossary-item p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

.glossary-item p:last-child {
  margin-bottom: 0;
}

.glossary-item .also {
  color: var(--faint);
  font-size: 13px;
}

@media (max-width: 920px) {
  .catchup {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 620px) {
  .nav {
    padding: 12px 0;
  }

  main.site {
    padding-top: 18px;
  }

  .auth-card {
    padding: 22px;
  }

  .rank-table th,
  .rank-table td {
    padding: 10px 8px;
    font-size: 13.5px;
  }
}

/* -------- 사전 설문 (survey.html) -------- */
.sv-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--blue-soft);
  overflow: hidden;
  margin-top: 8px;
}

.sv-progress-bar {
  height: 100%;
  width: 0;
  background: var(--blue);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.sv-count {
  min-height: 20px;
  margin: 8px 2px 0;
  text-align: right;
  color: var(--faint);
  font-size: 13px;
  font-weight: 800;
}

.sv-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
  background: white;
}

.sv-title {
  margin: 0 0 10px;
  font-size: 26px;
}

.sv-q {
  margin: 10px 0 20px;
  font-size: 21px;
  line-height: 1.4;
}

.sv-sub {
  margin: 22px 0 10px;
  font-size: 16px;
}

.sv-lead {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

.sv-group {
  display: inline-block;
  color: var(--blue-deep);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.4;
}

.sv-choices {
  display: grid;
  gap: 10px;
}

.sv-choice {
  width: 100%;
  min-height: 52px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 13px 16px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.4;
}

.sv-choice:hover {
  background: var(--paper);
}

.sv-choice.on {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-deep);
  outline: 1px solid var(--blue);
}

.sv-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.sv-actions .primary {
  margin-left: auto;
}

.sv-wide {
  width: 100%;
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-size: 16px;
}

a.primary.sv-wide {
  display: flex;
  margin-top: 10px;
}

.sv-review {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff1ee;
}

.sv-review.ok {
  background: var(--mint);
}

.sv-review-q {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.5;
}

.sv-review-a {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .sv-card {
    padding: 22px;
  }

  .sv-q {
    font-size: 19px;
  }
}

.sv-hint {
  margin: -8px 0 18px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* -------- 사진 첨부 (미션 답변 · 큰 미션) -------- */
.mp-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  cursor: pointer;
  user-select: none;
}

.mp-image-preview img {
  width: 72px;
  height: 72px;
}

.mp-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.mp-photos:empty {
  display: none;
}

.mp-photo {
  position: relative;
  width: 88px;
  height: 88px;
}

.mp-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
  background: white;
}

.mp-photo-x {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: white;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
}

.mp-big-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mp-big-actions button {
  margin-top: 0;
}

.mp-big > .mp-save-msg {
  display: block;
  margin: 10px 0 0;
  line-height: 1.5;
}

/* -------- 모바일 최적화 -------- */
@media (max-width: 620px) {
  .nav {
    min-height: 0;
    gap: 6px 10px;
  }

  .nav-actions {
    margin-left: auto;
    gap: 8px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: none;
    padding: 9px 12px;
  }

  .auth-badge {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 8px 12px;
  }

  a.ghost,
  button.ghost,
  a.primary,
  button.primary {
    min-height: 44px;
    justify-content: center;
  }

  .section-title h2 {
    font-size: 24px;
  }

  /* iOS는 16px 미만 입력칸을 누르면 화면을 확대해 버린다 */
  .field input,
  .mp-field input[type="text"],
  .mp-field select,
  .mp-field textarea,
  .mp-big textarea,
  select.ghost {
    font-size: 16px;
  }

  .mp-row {
    min-height: 48px;
    padding: 10px 8px;
    align-items: flex-start;
    line-height: 1.45;
  }

  .mp-row input {
    margin-top: 1px;
  }

  .mp-note,
  .mp-answer {
    margin-left: 0;
  }

  .mp-answer {
    padding: 12px;
  }

  .mp-answer-footer {
    flex-wrap: wrap;
  }

  .mp-big {
    padding: 14px;
  }

  .mp-big-actions .mp-photo-btn,
  .mp-big-actions .primary {
    flex: 1 1 140px;
  }

  .side {
    padding: 18px;
  }

  .score strong {
    font-size: 44px;
  }

  footer.site .foot-inner {
    flex-direction: column;
  }
}

label.ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 750;
  font-size: 14px;
  cursor: pointer;
}

label.ghost:hover {
  background: var(--paper);
}

/* -------- 버튼 선택 (하나만) -------- */
.mp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-chip {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 9px 16px;
  font-size: 14.5px;
  font-weight: 750;
  cursor: pointer;
}

.mp-chip:hover {
  background: var(--paper);
}

.mp-chip.on {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-deep);
  outline: 1px solid var(--blue);
}

.mp-check-list {
  display: grid;
  gap: 8px;
}

.mp-check-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.mp-check-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.mp-check-item b,
.mp-check-item small {
  display: block;
}

.mp-check-item b {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.mp-check-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* -------- 달성 카드 -------- */
.ac-locked,
.ac-unlocked {
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  background: var(--paper);
}

.ac-locked strong,
.ac-unlocked strong {
  display: block;
  font-size: 16px;
}

.ac-locked p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.ac-locked small {
  display: block;
  margin-top: 10px;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.5;
}

.ac-bar {
  height: 10px;
  border-radius: 999px;
  background: #e1e8f4;
  overflow: hidden;
}

.ac-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.ac-thumb {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 12px auto 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(27, 52, 91, 0.25);
}

.ac-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.ac-thumb-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.ac-thumb-actions .ghost {
  flex: 1;
}

.ac-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 16, 28, 0.78);
  overflow-y: auto;
}

.ac-modal-body {
  width: min(400px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.ac-headline {
  margin: 0;
  color: white;
  text-align: center;
  font-size: 18px;
  font-weight: 850;
}

.ac-modal-card img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 210px);
  height: auto;
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.ac-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ac-modal-actions .primary {
  flex: 1 1 100%;
  justify-content: center;
}

.ac-modal-actions .ghost {
  flex: 1;
}

/* -------- 달성 카드: 중앙 회전 등장 · 사례글 정리 -------- */
.ac-stage {
  display: grid;
  place-items: center;
  perspective: 1400px;
}

.ac-flip {
  position: relative;
  width: min(100%, calc((100dvh - 210px) * 0.72));
  aspect-ratio: 720 / 1000;
  transform-style: preserve-3d;
}

.ac-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.ac-front {
  display: block;
  object-fit: cover;
}

.ac-back {
  transform: rotateY(180deg);
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #3a46c8, #2a3499);
  border: 6px solid rgba(255, 255, 255, 0.28);
  color: white;
  font-size: 120px;
  font-weight: 900;
}

.ac-spin {
  animation: ac-spin-in 1.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes ac-spin-in {
  0% {
    transform: rotateY(0deg) scale(0.15);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: rotateY(1080deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-spin {
    animation: none;
  }
}

.ac-story {
  width: min(560px, 100%);
}

.ac-sub {
  margin: 0;
  color: #c9d4e8;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.ac-story-text {
  width: 100%;
  min-height: 260px;
  height: min(52dvh, 480px);
  resize: vertical;
  border: 0;
  border-radius: 12px;
  padding: 16px;
  background: white;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
}

.ac-copy-msg {
  margin: 0;
  min-height: 20px;
  color: #b8f5d0;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.ac-story-btn {
  width: 100%;
  margin-top: 10px;
}

@media (max-width: 620px) {
  .ac-story-text {
    font-size: 16px;
  }
}

/* ==========================================================
   BOLD THEME — 일렉트릭 블루 + 라임, 굵은 타이포, 스티커 느낌
   위쪽 규칙을 덮어쓰도록 파일 맨 끝에 둔다. 색은 :root 변수에서 바꾼다.
   ========================================================== */
body {
  background: var(--paper);
}

h1,
h2,
h3 {
  font-weight: 900;
  letter-spacing: -0.035em;
}

.shell {
  background: var(--paper);
}

/* -------- 헤더: 블루 바 -------- */
header.site {
  background: var(--blue);
  border-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand {
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  background: var(--lime);
  color: var(--ink);
  border-radius: 50%;
  box-shadow: none;
  border: 2px solid var(--ink);
}

.nav-links a {
  color: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

.nav-links a:hover,
.nav-links a.on {
  background: var(--lime);
  color: var(--ink);
}

header.site a.ghost,
header.site button.ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

header.site a.ghost:hover,
header.site button.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.auth-badge {
  background: var(--lime);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-weight: 900;
}

.auth-badge--warn {
  background: #fff1ee;
  color: var(--warn);
}

/* -------- 버튼: 라임 알약 스티커 -------- */
a.primary,
button.primary {
  background: var(--lime);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 11px 20px;
  font-weight: 900;
  font-size: 15px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

a.primary:hover,
button.primary:hover {
  background: #e6f9a0;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

a.primary:active,
button.primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

a.ghost,
button.ghost,
label.ghost {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  padding: 10px 18px;
}

a.ghost:hover,
button.ghost:hover,
label.ghost:hover {
  background: var(--lime);
}

/* -------- 스티커 라벨 / 제목 -------- */
.eyebrow {
  background: var(--lime);
  color: var(--ink);
  border: 2px dashed var(--ink);
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.section-title h2 {
  font-size: clamp(28px, 4.2vw, 40px);
}

.section-title p {
  color: var(--muted);
}

/* -------- 카드 -------- */
.card {
  border: 0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(58, 70, 200, 0.1);
}

.term {
  color: var(--blue);
}

/* -------- 입력 -------- */
.field input,
.mp-field input[type="text"],
.mp-field select,
.mp-field textarea,
.mp-big textarea {
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.field input:focus,
.mp-field input:focus,
.mp-field select:focus,
.mp-field textarea:focus,
.mp-big textarea:focus {
  outline: 3px solid rgba(58, 70, 200, 0.28);
  outline-offset: 0;
  border-color: var(--blue);
}

.auth-card {
  border: 0;
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(58, 70, 200, 0.16);
}

.auth-card h1 {
  font-size: 30px;
}

.auth-switch button {
  color: var(--blue);
}

.auth-msg.ok {
  background: var(--lime);
  color: var(--ink);
}

/* -------- 미션 패널 -------- */
.mp-row {
  border-radius: 18px;
}

.mp-row:hover {
  background: var(--paper);
}

.mp-row input {
  accent-color: var(--blue);
}

.mp-pace,
.mp-answer,
.mp-big {
  border-radius: 22px;
  background: var(--paper);
}

.mp-badge {
  border: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 900;
}

.mp-badge--done {
  background: var(--lime);
  border-color: var(--ink);
  color: var(--ink);
}

.mp-chip {
  border: 2px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.mp-chip:hover {
  border-color: var(--ink);
  background: #fff;
}

.mp-chip.on {
  background: var(--lime);
  border-color: var(--ink);
  color: var(--ink);
  outline: 0;
  box-shadow: 2px 2px 0 var(--ink);
}

.mp-photo img,
.mp-image-preview img {
  border: 2px solid var(--ink);
}

/* -------- 랭킹 표 / 용어사전 -------- */
.rank-table th {
  background: var(--blue);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rank-table tr.me {
  background: var(--lime);
  font-weight: 800;
}

.rank-num {
  font-family: "Unbounded", "Pretendard Variable", sans-serif;
  font-weight: 900;
}

.glossary-item {
  border: 0;
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(58, 70, 200, 0.08);
}

.glossary-item .term-badge {
  background: var(--lime);
  color: var(--ink);
  border: 2px solid var(--ink);
}

/* -------- 설문 -------- */
.sv-card {
  border: 0;
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(58, 70, 200, 0.16);
}

.sv-group {
  background: var(--lime);
  color: var(--ink);
  border: 2px dashed var(--ink);
  font-weight: 900;
}

.sv-progress {
  background: var(--blue-soft);
}

.sv-choice {
  border: 2px solid var(--line);
  border-radius: 20px;
  font-weight: 800;
}

.sv-choice:hover {
  border-color: var(--ink);
  background: #fff;
}

.sv-choice.on {
  background: var(--lime);
  border-color: var(--ink);
  color: var(--ink);
  outline: 0;
  box-shadow: 3px 3px 0 var(--ink);
}

/* -------- 달성 카드 패널 -------- */
.ac-locked,
.ac-unlocked {
  border-radius: 22px;
}

.ac-bar {
  background: #dcdcf5;
}

.ac-bar span {
  background: var(--blue);
}

/* -------- 픽셀 보상 캐릭터 / 보너스 인증 -------- */
.rw-panel {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.rw-panel[open] {
  display: grid;
}

.rw-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.rw-summary::-webkit-details-marker {
  display: none;
}

.rw-summary::after {
  content: "수정";
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.rw-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.rw-head strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
}

.rw-head p,
.rw-caption {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.rw-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.rw-preview {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 12px;
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
    var(--blue-soft);
  border: 1px solid var(--line);
}

.rw-preview b,
.rw-preview small {
  display: block;
}

.rw-preview b {
  font-size: 15px;
  font-weight: 900;
}

.rw-preview small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.rw-sprite {
  display: block;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.rw-sprite--hero {
  width: 76px;
  height: 76px;
  animation: rw-bob 2.2s ease-in-out infinite;
}

.rw-sprite--character {
  width: 42px;
  height: 42px;
}

.rw-sprite--buddy {
  width: 48px;
  height: 48px;
}

.rw-sprite--evo {
  width: 46px;
  height: 46px;
}

@keyframes rw-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.rw-grid {
  display: grid;
  gap: 6px;
}

.rw-grid--characters {
  grid-template-columns: repeat(5, 1fr);
}

.rw-grid--buddies {
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  margin-top: 10px;
}

.rw-stage-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.rw-stage-tabs button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.rw-stage-tabs button.on {
  border-color: var(--ink);
  background: var(--lime);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.rw-stack {
  position: relative;
  width: 116px;
  height: 146px;
  margin: 8px auto 4px;
}

.rw-stack-item {
  display: grid;
  place-items: center;
  position: absolute;
  left: 50%;
  bottom: calc(var(--stack-index, 0) * 35px);
  z-index: calc(10 + var(--stack-index, 0));
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transform: translateX(-50%) translateX(calc((var(--stack-index, 0) - 1) * 4px));
  filter: drop-shadow(0 8px 0 rgba(12, 12, 46, 0.1));
}

.rw-stack-item .rw-sprite--buddy {
  width: 82px;
  height: 82px;
}

.rw-stack-item b {
  position: absolute;
  right: 3px;
  top: 7px;
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: translateY(-3px);
}

.rw-stack-item:hover b,
.rw-stack-item:focus-visible b {
  opacity: 1;
  transform: translateY(0);
}

.rw-stack .rw-empty {
  position: static;
  width: min(100%, 320px);
  margin: 0;
}

.rw-stack:has(.rw-empty) {
  width: auto;
  height: auto;
  margin: 0;
}

.rw-evolution {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.rw-evo-step {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 0;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.rw-evo-step b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.rw-guide {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.rw-pick {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 56px;
  aspect-ratio: 1;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}

.rw-pick:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
}

.rw-pick.on {
  border-color: var(--ink);
  background: var(--lime);
  box-shadow: 2px 2px 0 var(--ink);
}

.rw-pick.locked {
  opacity: 0.58;
  cursor: not-allowed;
}

.rw-pick.locked.on {
  opacity: 1;
}

.rw-pick--buddy {
  min-height: 58px;
  padding: 4px;
  overflow: visible;
}

.rw-bonus {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--paper);
}

.rw-edit-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--paper);
}

.rw-swatches {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.rw-swatch,
.rw-color-custom {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  padding: 4px;
}

.rw-swatch span {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  border: 1px solid rgba(12, 12, 46, 0.14);
}

.rw-swatch.on {
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.rw-color-custom input {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.rw-head--small span {
  background: var(--blue);
  color: #fff;
}

.rw-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.rw-kind {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-weight: 800;
}

.rw-file {
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 42px;
}

.rw-submit {
  width: 100%;
}

.rw-proofs {
  display: grid;
  gap: 6px;
}

.rw-proof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}

.rw-proof strong {
  color: var(--blue);
}

.rw-empty,
.rw-msg {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.rw-msg--ok {
  color: var(--ok);
  font-weight: 900;
}

.rw-msg--err {
  color: var(--warn);
  font-weight: 900;
}

.rw-msg--hint {
  color: var(--muted);
}

/* -------- 푸터: 블루 -------- */
footer.site {
  margin-top: 0;
  padding: 10px 0 34px;
  background: var(--blue);
  color: rgba(255, 255, 255, 0.88);
  border-top: 0;
}

footer.site a,
footer.site strong {
  color: var(--lime);
}

@media (max-width: 620px) {
  a.primary,
  button.primary,
  a.ghost,
  button.ghost,
  label.ghost {
    min-height: 44px;
  }

  .nav-links a {
    padding: 9px 14px;
  }

  .card,
  .auth-card,
  .sv-card {
    border-radius: 24px;
  }

  .rw-grid--characters {
    grid-template-columns: repeat(4, 1fr);
  }

  .rw-grid--buddies {
    grid-template-columns: repeat(5, 1fr);
  }

  .rw-stack {
    margin-left: auto;
    margin-right: auto;
  }

  .rw-swatches {
    grid-template-columns: repeat(4, 1fr);
  }
}
