/* 모두글 Pro — 가격표·구매·구독 관리·Pro 도구
   본문 색 대비는 styles.css와 같은 기준(4.5:1 이상)을 지켜요. */

/* ---------- 가격표 ---------- */
.card-pricing {
  border-color: #93c5fd;
}

.pricing-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
  margin: 1rem 0 0.25rem;
  padding: 0.95rem 1.05rem;
  border: 1.5px solid #bfdbfe;
  border-radius: 0.8rem;
  background: var(--brand-tint);
}

.status-strip p {
  margin: 0;
}

.status-label {
  color: var(--ink-soft);
  font-weight: 700;
  margin-right: 0.35rem;
}

.status-plan .badge {
  font-size: 0.9rem;
}

.status-remain strong {
  font-size: 1.12rem;
  color: var(--brand-dark);
}

.status-note {
  flex-basis: 100%;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.status-action {
  margin-left: auto;
}

.plan-group {
  margin-top: 1.65rem;
}

.plan-group > h3 {
  margin: 0 0 0.2rem;
  font-size: 1.18rem;
}

.plan-group > .help {
  margin-bottom: 0.9rem;
}

.plan-grid {
  display: grid;
  gap: 0.95rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

@media (min-width: 42rem) {
  .plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .plan-grid.subs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1.5px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
}

.plan-card-featured {
  border: 2px solid var(--brand);
  background: linear-gradient(180deg, #f5f9ff 0%, var(--surface) 60%);
  box-shadow: 0 6px 22px rgba(10, 70, 140, 0.12);
}

.plan-card-current {
  border-color: #93c5fd;
  background: var(--brand-tint);
}

.plan-flag {
  position: absolute;
  top: -0.82rem;
  left: 1rem;
  margin: 0;
  padding: 0.12rem 0.65rem;
  border-radius: 2rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.plan-card h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-dark);
}

.plan-tag {
  margin: 0;
  min-height: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.35rem 0 0;
}

.price-now {
  font-size: 1.72rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.price-was {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.price-was [aria-hidden="true"] {
  text-decoration: line-through;
}

.price-suffix {
  color: var(--ink-soft);
  font-size: 0.98rem;
  font-weight: 700;
}

.price-cur {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.plan-unit {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.save-line {
  margin: 0.25rem 0 0;
}

.save-badge {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 2rem;
  background: var(--ok-bg);
  border: 1.5px solid #14532d;
  color: var(--ok-text);
  font-size: 0.8rem;
  font-weight: 800;
}

.plan-features {
  margin: 0.55rem 0 0.9rem;
  padding-left: 0;
  list-style: none;
  font-size: 0.95rem;
}

.plan-features li {
  margin: 0.3rem 0;
  padding-left: 1.35rem;
  position: relative;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.52rem;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2.5px solid var(--brand);
  border-bottom: 2.5px solid var(--brand);
  transform: rotate(-45deg);
}

.plan-btn {
  margin-top: auto;
  width: 100%;
}

/* ---------- 비교 표 ---------- */
.compare-wrap {
  margin-top: 1.75rem;
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.compare-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--ink);
  padding: 0 0 0.55rem;
}

.compare-table th,
.compare-table td {
  padding: 0.62rem 0.7rem;
  border-bottom: 1.5px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--bg-soft);
  color: var(--brand-dark);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.compare-table thead th:first-child {
  width: 42%;
}

.compare-table tbody th {
  font-weight: 700;
  color: var(--ink);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- 결제 안내 ---------- */
.price-notes {
  margin-top: 1.6rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: 0.8rem;
  background: var(--bg);
}

.price-notes h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}

.price-notes ul {
  margin: 0;
}

.price-links {
  margin: 0.7rem 0 0;
}

/* ---------- 데모 체험 ---------- */
.demo-bar {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1.5px dashed var(--line-strong);
  border-radius: 0.8rem;
  background: var(--surface);
}

.demo-bar .check {
  margin: 0;
}

.demo-bar .help {
  margin: 0.35rem 0 0 2.15rem;
}

/* ---------- 대화상자 ---------- */
.dialog {
  width: min(38rem, calc(100% - 1.5rem));
  max-height: min(88vh, 52rem);
  margin: auto;
  padding: 0;
  border: none;
  border-radius: 1rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.32);
  overflow: hidden;
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.dialog-fallback {
  position: fixed;
  inset: 1rem;
  z-index: 50;
  width: auto;
  max-height: calc(100vh - 2rem);
}

.dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 52rem);
  padding: 1.25rem 1.3rem 1.4rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  padding-top: 0.1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1.5px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.5rem;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.35;
}

.dialog .summary,
.tool-panel .summary {
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 0.9rem;
}

.dialog .actions {
  margin-top: 0.9rem;
}

.step-kicker {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.08rem 0.5rem;
  border-radius: 2rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.72em;
  font-weight: 800;
  vertical-align: 0.12em;
}

.purchase-pick {
  margin: 0.3rem 0 0.6rem;
}

.purchase-pick select {
  min-height: 3rem;
}

.purchase-benefits {
  margin: 0.55rem 0 0.2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.purchase-includes {
  margin: 0.9rem 0 0.35rem;
  color: var(--brand-dark);
}

.purchase-links {
  margin-top: 0.9rem;
}

.dialog-head .btn {
  flex: none;
}

.dialog h3 {
  font-size: 1.12rem;
  margin: 0.4rem 0 0.45rem;
}

.dialog h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

/* ---------- 단계 표시 ---------- */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  margin: 0 0 0.3rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0;
}

.steps li.is-current {
  color: var(--brand-dark);
  font-weight: 800;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-soft);
  flex: none;
}

.steps li.is-current .step-num {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.step-count {
  margin: 0 0 0.4rem;
  color: var(--ink-soft);
}

/* ---------- 안내 상자 ---------- */
.callout {
  margin: 0.85rem 0;
  padding: 0.9rem 1rem;
  border-left: 5px solid var(--brand);
  border-radius: 0.55rem;
  background: var(--brand-tint);
}

.callout p {
  margin: 0.25rem 0;
}

.callout .btn {
  margin-top: 0.6rem;
}

.callout-title {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.callout-demo {
  border-left-color: #92400e;
  background: #fffbeb;
  color: #78350f;
}

.callout-ok {
  border-left-color: #14532d;
  background: var(--ok-bg);
  color: #14532d;
}

.callout-warn {
  border-left-color: var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
}

.callout-offer {
  border: 1.5px solid #bfdbfe;
  border-left: 5px solid var(--brand);
  background: #f5f9ff;
}

.manage-facts {
  margin: 0.6rem 0 1rem;
}

/* ---------- 해지 사유 ---------- */
.reasons {
  margin: 0.5rem 0 1rem;
  padding: 0.85rem 0.95rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: 0.8rem;
  background: var(--bg);
}

.reasons legend {
  padding: 0 0.4rem;
}

.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.3rem 0;
}

.radio-row input[type="radio"] {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.18rem 0 0;
  accent-color: var(--brand);
  flex: none;
}

.radio-row label {
  font-weight: 600;
}

/* ---------- 추가 버튼 ---------- */
.btn-small {
  min-height: 2.75rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.95rem;
}

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

.btn-danger:hover:not(:disabled) {
  background: #5c130c;
  border-color: #5c130c;
}

.btn-danger-outline {
  background: var(--surface);
  border-color: var(--danger-line);
  color: var(--danger);
}

.btn-danger-outline:hover:not(:disabled) {
  background: var(--danger-bg);
}

/* ---------- Pro 도구 ---------- */
.pro-tools {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1.5px dashed var(--line-strong);
}

.pro-tools > h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.pro-tools .badge {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pro-tools .actions {
  margin-top: 0.6rem;
}

.pro-tools .btn.is-locked {
  border-style: dashed;
  background: var(--bg-soft);
  color: var(--brand-dark);
}

.tool-panel {
  margin-top: 1.2rem;
  padding: 1rem 1rem 1.1rem;
  border: 1.5px solid #bfdbfe;
  border-radius: 0.8rem;
  background: #f8fbff;
}

.tool-panel h4 {
  margin: 0 0 0.2rem;
  font-size: 1.08rem;
  color: var(--brand-dark);
}

.tool-panel h5 {
  margin: 1rem 0 0.35rem;
  font-size: 0.98rem;
  color: var(--ink);
}

.note-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 0.8rem;
}

@media (min-width: 40rem) {
  .note-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.note-grid .summary {
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.18rem 0.6rem;
  border: 1.5px solid #bfdbfe;
  border-radius: 2rem;
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
}

.tag-list .count {
  color: var(--ink-soft);
  font-weight: 700;
}

.outline-list,
.key-list,
.summary-list {
  margin: 0.2rem 0 0;
  padding-left: 0.2rem;
  list-style: none;
}

.outline-list li,
.key-list li,
.summary-list li {
  margin: 0.45rem 0;
}

.outline-list li.depth-2 {
  margin-left: 1rem;
}

.outline-list li.depth-3 {
  margin-left: 2rem;
}

.link-btn {
  display: inline;
  min-height: 1.8rem;
  padding: 0.1rem 0.15rem;
  border: none;
  background: none;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.link-btn:hover {
  background: var(--brand-tint);
}

.quote {
  color: var(--ink-soft);
}

.count {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.tool-actions {
  margin-top: 0.9rem;
}

#tidy-text {
  min-height: 12rem;
  margin-top: 0.5rem;
  font-family: "SFMono-Regular", ui-monospace, "Menlo", monospace;
  font-size: 0.95rem;
}

/* 상태 문구 색 */
.status-inline[data-kind="error"] {
  color: var(--danger);
}

.status-inline[data-kind="ok"] {
  color: var(--ok-text);
}

.status-inline[data-kind="pro"] {
  color: var(--brand-dark);
}

/* 좁은 화면에서는 단계 표시와 대화상자 여백을 줄여요 */
@media (max-width: 30rem) {
  .dialog-inner {
    padding: 1.05rem 1rem 1.2rem;
  }
  .status-action {
    margin-left: 0;
  }
  .price-now {
    font-size: 1.55rem;
  }
  .steps {
    gap: 0.25rem 0.6rem;
    font-size: 0.84rem;
  }
  .dialog-head {
    flex-wrap: wrap;
  }
}

/* ---------- 머리글 링크 ---------- */
.header-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.25rem 0.9rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 2rem;
  background: var(--surface);
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.header-link:hover {
  background: var(--brand-tint);
}

.limit-note {
  margin-top: 0.9rem;
}

.limit-note a {
  color: var(--brand-dark);
  font-weight: 800;
}

/* A link styled as a button — the Polar customer portal opens in a new tab. */
.actions a.btn,
.callout a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* 이메일 간편 로그인 안내 (2026-12-04 추가) */
.plan-account{margin:0 0 18px;padding:14px 16px;border:1px solid var(--line,#cfd8d1);border-radius:12px;background:#f6f9f6}
.plan-account h3{margin:0 0 6px;font-size:1.02rem}
.plan-account p{margin:0 0 10px}
.plan-account .btn{width:100%}
@media (min-width:560px){.plan-account .btn{width:auto}}
