/* ===== 기본 설정 ===== */
:root {
  --brand: #18345d;
  --brand-dark: #10233f;
  --brand-soft: #eef3f8;
  --accent: #26734d;
  --accent-dark: #1f5e3f;
  --point: #d97706;
  --ink: #172033;
  --text: #2f3a4a;
  --muted: #687386;
  --line: #dde4ee;
  --bg: #f6f8fb;
  --white: #ffffff;
  --ok: #15803d;
  --radius: 10px;
  --shadow: 0 10px 24px rgba(18, 35, 60, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 버튼 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--accent {
  background: var(--accent);
  color: #fff;
}

.btn--accent:hover {
  background: var(--accent-dark);
}

.btn--outline {
  background: #fff;
  color: var(--brand);
  border-color: #cfd8e5;
}

.btn--outline:hover {
  border-color: var(--brand);
  background: #f8fafc;
}

.btn--lg {
  min-height: 50px;
  padding: 13px 26px;
  font-size: 16px;
}

.btn--block {
  width: 100%;
}

/* ===== 상단바 ===== */
.topbar {
  background: #10233f;
  color: #d8e1ef;
  font-size: 13px;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
  gap: 12px;
}

.topbar__tel {
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== 헤더 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 21px;
  font-weight: 900;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
  line-height: 1;
}

.logo__text {
  color: var(--ink);
  white-space: nowrap;
}

.logo--light .logo__text {
  color: #fff;
}

.gnb {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 4px;
}

.gnb a {
  color: #3d4858;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.gnb a:hover {
  color: var(--accent);
}

.header__cta {
  margin-left: auto;
  flex-shrink: 0;
}

/* ===== 메인 배너 ===== */
.hero {
  background: #fff;
  padding: 24px 0 42px;
}

.hero__banner {
  width: 100%;
  overflow: hidden;
  background: #10233f;
}

.hero__banner picture,
.hero__banner img {
  display: block;
  width: 100%;
}

.hero__banner img {
  height: auto;
}

.hero__actions-wrap {
  margin-top: 18px;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ===== 강점 ===== */
.features {
  background: var(--bg);
  padding: 54px 0;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.feature__label {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.feature h3 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.35;
}

.feature p {
  color: var(--muted);
  font-size: 14px;
}

/* ===== 섹션 공통 ===== */
.sec-head {
  margin-bottom: 34px;
  text-align: center;
}

.sec-head--left {
  text-align: left;
}

.sec-head h2 {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.sec-head p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 15px;
}

/* ===== 실시간 현황 ===== */
.live {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background: #f8fbff;
}

.live::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/opa_back01.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 1;
  pointer-events: none;
}

.live::after {
  display:none;
}

.live > .container {
  position: relative;
  z-index: 1;
}

.live__table-wrap,
.price__table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(221, 228, 238, .92);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(2px);
}

.live__table,
.price__table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: rgba(255,255,255,.9);
}

.live__table th,
.live__table td,
.price__table th,
.price__table td {
  padding: 13px 15px;
  border-bottom: 1px solid #edf1f6;
  text-align: center;
  font-size: 14px;
  white-space: nowrap;
}

.live__table thead th,
.price__table thead th {
  background: #f8fafc;
  color: #344256;
  font-weight: 800;
}

.live__table tbody tr:last-child td,
.price__table tbody tr:last-child td {
  border-bottom: 0;
}

.live__table tbody tr.is-new {
  animation: flash 1s ease;
}

@keyframes flash {
  from {
    background: #fff8eb;
  }

  to {
    background: #fff;
  }
}

/* 상태 표시는 배지 박스 없이 텍스트 색상만 사용 */
.badge {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  line-height: inherit;
}

.badge--ok {
  color: var(--ok);
}

.badge--ing {
  color: #a75b00;
}

.badge--wait {
  color: var(--muted);
}

/* ===== 교환 신청 ===== */
.apply {
  background: var(--bg);
  padding: 66px 0;
}

.apply__grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: start;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card__title {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  line-height: 1.35;
}

/* 상품권 선택 */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.brand-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px 12px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.brand-item:hover {
  border-color: #b6c4d5;
  background: #fbfcfe;
}

.brand-item.selected {
  border-color: var(--accent);
  background: #f2f8f5;
}

.brand-item__name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.brand-item__rate {
  margin-top: 2px;
  color: var(--point);
  font-size: 13px;
  font-weight: 800;
}

/* 신청 폼 */
.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  color: #344256;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(38, 115, 77, .1);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pin-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #3d4858;
  font-size: 14px;
}

.pin-mode label,
.agree {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.agree {
  color: var(--muted);
  font-size: 13px;
}

/* ===== 매입시세 ===== */
.price {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background: #fffaf3;
}

.price::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/opa_back02.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 1;
  pointer-events: none;
}

.price::after {
  display:none;
}

.price > .container {
  position: relative;
  z-index: 1;
}

.price__table b {
  color: var(--point);
  font-size: 16px;
}

/* ===== 이용방법 ===== */
.steps {
  background: var(--bg);
  padding: 64px 0;
}

.steps__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.step__no {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.step h4 {
  margin-bottom: 8px;
  font-size: 17px;
}

.step p {
  color: var(--muted);
  font-size: 14px;
}

/* ===== FAQ ===== */
.faq {
  padding: 64px 0;
}

.faq__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr);
  gap: 34px;
  align-items: start;
}

.qa {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 16px;
}

.qa summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 15px 24px 15px 0;
  font-weight: 800;
}

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

.qa summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 15px;
  color: var(--accent);
  font-weight: 900;
}

.qa[open] summary::after {
  content: "−";
}

.qa p {
  padding: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.cs-card {
  background: #10233f;
  color: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
}

.cs-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.cs-card__tel {
  display: block;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.cs-card p {
  margin: 7px 0 20px;
  color: #cbd7e8;
  font-size: 14px;
}

.cs-card .btn--accent {
  background: #fff;
  color: #10233f;
}

.cs-card .btn--accent:hover {
  background: #eef3f8;
}

/* ===== 푸터 ===== */
.footer {
  background: #111827;
  color: #aeb8c8;
  padding: 44px 0 0;
  font-size: 13px;
}

.footer__inner {
  display: grid;
  grid-template-columns: .85fr 1.7fr auto;
  gap: 28px;
  align-items: start;
}

.footer__desc {
  margin-top: 10px;
}

.footer__info p {
  margin-bottom: 4px;
}

.footer__links {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}

.footer__links a:hover {
  color: #fff;
}

.footer__copy {
  margin-top: 28px;
  padding: 17px 0;
  border-top: 1px solid #253044;
  color: #7d8798;
  text-align: center;
  font-size: 12px;
}

/* ===== 위로가기 버튼 ===== */
.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #ffffff;
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, box-shadow .25s ease;
}

.scroll-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12), 0 4px 10px rgba(0, 0, 0, .08);
}

.scroll-top:active {
  transform: translateY(0);
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== 태블릿 ===== */
@media (max-width: 1024px) {
  .container {
    padding: 0 18px;
  }

  .header__inner {
    gap: 18px;
  }

  .gnb {
    gap: 16px;
  }

  .gnb a {
    font-size: 14px;
  }

  .hero {
    padding: 20px 0 36px;
  }

  .features__grid,
  .steps__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .apply__grid,
  .faq__inner {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .footer__links {
    flex-wrap: wrap;
  }

  .scroll-top {
    right: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}

/* ===== 모바일 ===== */
@media (max-width: 760px) {
  .container {
    padding: 0 16px;
  }

  .topbar {
    font-size: 12px;
  }

  .topbar__inner {
    justify-content: center;
    min-height: 34px;
  }

  .topbar__inner span {
    display: none;
  }

  .header__inner {
    min-height: 62px;
  }

  .logo {
    font-size: 19px;
  }

  .logo__mark {
    width: 32px;
    height: 32px;
  }

  .gnb {
    display: none;
  }

  .header__cta {
    margin-left: auto;
    min-height: 38px;
    padding: 8px 13px;
    font-size: 13px;
  }

  .hero {
    padding: 14px 0 32px;
  }

  .hero__actions-wrap {
    margin-top: 12px;
  }

  .hero__actions {
    gap: 8px;
  }

  .hero__actions .btn {
    flex: 1;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .features,
  .apply,
  .steps,
  .faq {
    padding: 48px 0;
  }

  .live,
  .price {
    padding: 52px 0;
  }

  .live::before,
  .price::before {
    background-size: cover;
    background-position: center;
    opacity: 1;
  }

  .live::after,
  .price::after {
    display:none;
  }

  .sec-head {
    margin-bottom: 26px;
  }

  .sec-head h2 {
    font-size: 24px;
  }

  .sec-head p {
    font-size: 14px;
  }

  .features__grid,
  .steps__grid,
  .brand-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }

  .pin-mode {
    flex-direction: column;
    gap: 8px;
  }

  .live__table,
  .price__table {
    min-width: 640px;
  }

  .live__table th,
  .live__table td,
  .price__table th,
  .price__table td {
    padding: 11px 12px;
    font-size: 13px;
  }

  .cs-card__tel {
    font-size: 24px;
  }

  .scroll-top {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

/* ===== 소형 모바일 ===== */
@media (max-width: 420px) {
  .header__cta {
    padding: 8px 10px;
    font-size: 12.5px;
  }

  .logo__text {
    font-size: 18px;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .btn--lg {
    min-height: 48px;
    padding: 12px 20px;
  }

  .scroll-top {
    right: 14px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}