/* ===== 이용권 / 결제 ===== */

.main.main--billing {
  padding: 12px 16px 12px;
  gap: 0;
  overflow: hidden;
}

.billing {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  gap: 0;
  padding: 12px 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.billing__head { margin-bottom: 2px; }

.billing__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.4px;
}

.billing__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
}
.billing__mark svg { width: 16px; height: 16px; stroke-width: 1.9; }

.billing__tabs {
  display: flex;
  flex: none;
  gap: 4px;
  margin: 4px 0 10px;
  border-bottom: 1px solid var(--line);
}

.billing__tab {
  padding: 8px 14px 9px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
}
.billing__tab:hover { color: var(--text); }
.billing__tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.billing__panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  gap: 12px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 20px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.plan--premium {
  border: 2px solid var(--orange);
  box-shadow: 0 8px 22px rgba(240, 138, 36, .12);
}

.plan__ribbon {
  position: absolute;
  top: 16px;
  right: -38px;
  z-index: 1;
  width: 132px;
  padding: 5px 0;
  background: var(--red);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .4px;
  text-align: center;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(160, 20, 20, .2);
}

.plan__crown {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 4px;
  color: #e8a317;
}
.plan__crown svg { width: 24px; height: 24px; fill: #f0b429; stroke: #d49212; stroke-width: 1.2; }

.plan__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.3px;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 14px;
  font-weight: 800;
  letter-spacing: -.5px;
}
.plan__price b {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.plan__price span {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
}

.plan__list {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 11px;
  margin-bottom: 16px;
  min-height: 0;
}

.plan__feat {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
}

.plan__check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--primary);
}
.plan__check svg { width: 20px; height: 20px; }
.plan__check circle { fill: currentColor; stroke: none; }
.plan__check path { stroke: #fff; stroke-width: 1.9; fill: none; }

.plan__btn {
  width: 100%;
  height: 48px;
  flex: none;
  margin-top: auto;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
}
.plan__btn--current {
  background: #eceff4;
  color: #5b6474;
  cursor: default;
}
.plan__btn--current:hover { background: #eceff4; }
.plan__btn--blue {
  background: var(--primary);
  color: #fff;
}
.plan__btn--blue:hover { background: var(--primary-dark); }
.plan__btn--orange {
  background: var(--orange);
  color: #fff;
}
.plan__btn--orange:hover { background: #d97816; }

.pay-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.pay-table {
  width: 100%;
  border-collapse: collapse;
}
.pay-table th,
.pay-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 15px;
}
.pay-table th {
  color: var(--text-muted);
  font-weight: 700;
}
.pay-table td { font-weight: 600; }
.pay-table .is-ok { color: var(--green); font-weight: 800; }
.pay-empty {
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.paybox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 21, 31, .45);
}
.paybox[hidden] { display: none !important; }
.paybox__panel {
  width: min(420px, 100%);
  padding: 22px 20px 18px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.paybox__title { font-size: 17px; font-weight: 800; }
.paybox__lead {
  margin: 10px 0 8px;
  font-size: 14px;
  font-weight: 700;
}
.paybox__hint {
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}
.paybox__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 980px) {
  .main.main--billing { overflow-y: auto; }
  .billing { height: auto; }
  .plans {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    flex: none;
  }
  .plan { height: auto; }
}

@media (max-width: 720px) {
  .main.main--billing { padding: 10px 12px 12px; }
  .billing { padding: 12px 12px 14px; }
  .plan { padding: 14px 14px 12px; }
}
