/* 행간 · 기사 유료 결제 시연 (paywall) */
:root {
  --bg: #F3F0E8;
  --surface: #FFFDF8;
  --text: #1A1916;
  --muted: #645F55;
  --line: #DCD5C6;
  --primary: #B23A0E;
  --accent: #E8B13A;
  --ok: #2B7A4B;
  --warn: #8F5400;
  --danger: #B42318;

  --ink: #1A1916;
  --ink-2: #2A2925;
  --soft: #ECE7DB;
  --primary-tint: #FBEDE6;
  --ok-tint: #E4F1E8;
  --warn-tint: #FBF0DA;
  --danger-tint: #FBE9E7;
  --ticket: #FCF1D4;
  --ticket-ink: #5B4200;

  --r: 4px;
  --f-head: "Song Myung", "Nanum Myeongjo", "AppleMyungjo", serif;
  --f-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.pw {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
:where(.pw) :where(h1, h2, h3, p, ul, ol, dl, dd, figure) { margin: 0; }
:where(.pw) :where(ul, ol) { padding: 0; list-style: none; }
:where(.pw) a { color: inherit; }
:where(.pw) :where(button, input, select) { font: inherit; color: inherit; }
:where(.pw) button { cursor: pointer; }
:where(.pw) svg { display: block; }
.pw [hidden] { display: none !important; }
.pw :focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.pw-num { font-variant-numeric: tabular-nums; }
.pw-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.pw-narrow { max-width: 640px; }
.pw-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--primary); }
.pw-note { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pw-empty { padding: 16px 0; color: var(--muted); font-size: 14px; }
.pw-empty--pad { padding: 24px 20px; }
.pw-mast { font-family: var(--f-head); font-weight: 400; letter-spacing: -.02em; line-height: 1; }

/* 버튼 */
.pw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 1.5px solid transparent;
  font-size: 15px; font-weight: 700; text-decoration: none; text-align: center; line-height: 1.3;
  transition: background .15s, border-color .15s, color .15s;
}
.pw-btn:disabled { opacity: .45; cursor: not-allowed; }
.pw-btn--block { display: flex; width: 100%; }
.pw-btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.pw-btn--lg { min-height: 54px; font-size: 17px; }
.pw-btn--primary { background: var(--primary); color: #fff; }
.pw-btn--primary:not(:disabled):hover { background: #962F09; }
.pw-btn--dark { background: var(--ink); color: #fff; }
.pw-btn--dark:not(:disabled):hover { background: #000; }
.pw-btn--line { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.pw-btn--line:not(:disabled):hover { background: var(--soft); }
.pw-btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.pw-btn--ghost:hover { background: var(--soft); }
.pw-btn--danger { background: var(--danger); color: #fff; }
.pw-btn--danger-line { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.pw-btn--danger-line:hover { background: var(--danger-tint); }
.pw-btn span { font-weight: 500; opacity: .85; }
.pw-linkbtn { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 0; }
.pw-iconbtn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: var(--r); display: grid; place-items: center; }
.pw-iconbtn:hover { background: var(--soft); }
.pw-iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* 상태 표시 */
.pw-tag {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 3px;
  font-size: 12px; font-weight: 700; background: var(--soft); color: var(--text); white-space: nowrap;
}
.pw-tag--ok { background: var(--ok-tint); color: var(--ok); }
.pw-tag--warn { background: var(--warn-tint); color: var(--warn); }
.pw-tag--danger { background: var(--danger-tint); color: var(--danger); }
.pw-tag--block { background: var(--ink); color: #fff; }
.pw-tag--me { background: var(--accent); color: var(--ticket-ink); height: 20px; font-size: 11px; }

.pw-badge {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 3px;
  font-size: 12px; font-weight: 700; line-height: 1;
}
.pw-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pw-badge--paid { background: var(--ink); color: #fff; }
.pw-badge--free { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.pw-badge--owned { background: var(--ok-tint); color: var(--ok); }
.pw-badge--owned svg { stroke-width: 2.2; }

/* 상단 전환 띠 */
.pw-util { background: var(--ink); color: #E9E4D8; font-size: 13px; }
.pw-util__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.pw-switch { display: inline-flex; background: #2E2C28; border-radius: var(--r); padding: 3px; }
.pw-switch a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 3px; text-decoration: none; color: #CFC8B9; font-weight: 600; }
.pw-switch a.is-on { background: var(--surface); color: var(--ink); }
.pw-reset { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid #4A4740; border-radius: var(--r); background: transparent; color: #E9E4D8; font-size: 13px; }
.pw-reset:hover { background: #2E2C28; }
.pw-reset svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* 독자 머리글 */
.pw-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.pw-head__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 14px; }
.pw-brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; min-width: 0; }
.pw-brand .pw-mast { font-size: 38px; white-space: nowrap; }
.pw-brand__tag { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pw-account { flex: none; }
.pw-account__member { display: flex; align-items: center; gap: 10px; }
.pw-passchip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 999px;
  background: var(--ticket); color: var(--ticket-ink); text-decoration: none; font-size: 13px; font-weight: 600;
  border: 1px solid #E6CF92;
}
.pw-passchip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.pw-passchip b { font-size: 15px; }
.pw-me { font-weight: 700; text-decoration: none; font-size: 14px; }
.pw-account .pw-linkbtn { color: var(--muted); font-weight: 500; font-size: 13px; }
.pw-sections {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-top: 3px double var(--ink);
  margin: 0 -16px; padding: 0 12px;
}
.pw-sections::-webkit-scrollbar { display: none; }
.pw-sections a {
  flex: none; display: inline-flex; align-items: center; height: 44px; padding: 0 12px; text-decoration: none;
  font-size: 15px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent;
}
.pw-sections a.is-on { color: var(--text); border-bottom-color: var(--primary); }
.pw-sections__my { margin-left: auto; }

.pw-main { padding-bottom: 40px; }
@media (max-width: 559px) {
  .pw-head:has(.pw-account__member:not([hidden])) .pw-brand__tag { display: none; }
  .pw-brand .pw-mast { font-size: 34px; }
  .pw-account__member { gap: 8px; }
  .pw-passchip { padding: 0 9px; }
}

/* 기사 목록 */
.pw-dateline {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 0;
  font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line);
}
.pw-home__grid { display: grid; gap: 28px; padding-top: 8px; }
.pw-feed { display: grid; }
.pw-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; padding: 18px 0;
  border-bottom: 1px solid var(--line); text-decoration: none;
}
.pw-card__art { order: 2; border-radius: var(--r); overflow: hidden; aspect-ratio: 1 / 1; align-self: start; }
.pw-card__body { min-width: 0; }
.pw-card__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pw-card__sec { font-size: 13px; font-weight: 700; color: var(--primary); text-decoration: none; }
.pw-card__title { font-family: var(--f-head); font-weight: 400; font-size: 20px; line-height: 1.38; letter-spacing: -.01em; }
.pw-card:hover .pw-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pw-card__lead { margin-top: 6px; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pw-card__by { margin-top: 8px; font-size: 12px; color: var(--muted); }
.pw-card--lead { grid-template-columns: 1fr; padding-top: 16px; }
.pw-card--lead .pw-card__art { order: 0; aspect-ratio: 16 / 9; }
.pw-card--lead .pw-card__title { font-size: 26px; }
.pw-card--lead .pw-card__lead { -webkit-line-clamp: 3; font-size: 15px; }

.pw-art { width: 100%; height: 100%; }
.pw-art__bg { fill: #E7E0D0; }
.pw-art__ink { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: square; }
.pw-art__line { stroke-width: 5; stroke-linejoin: round; }
.pw-art__ink-fill { fill: var(--ink); }
.pw-art__box { fill: #B9AD94; }
.pw-art__hot { fill: var(--primary); }
.pw-art__sea { fill: #CFC6B2; }
.pw-art--price .pw-art__bg, .pw-art--calendar .pw-art__bg { fill: #E3E6DD; }
.pw-art--truck .pw-art__bg, .pw-art--gear .pw-art__bg { fill: #E9DFD2; }

.pw-rail { display: grid; gap: 16px; align-content: start; }
.pw-passcard { background: var(--ticket); border: 1px solid #E6CF92; border-radius: var(--r); padding: 20px; }
.pw-passcard .pw-eyebrow { color: var(--ticket-ink); }
.pw-passcard__title { margin-top: 6px; font-family: var(--f-head); font-weight: 400; font-size: 20px; line-height: 1.4; }
.pw-passcard__desc { margin-top: 8px; font-size: 14px; color: #5E513A; }
.pw-passcard__list { margin: 14px 0 16px; border-top: 1px dashed #CBB273; }
.pw-passcard__list li {
  display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 10px 0; border-bottom: 1px dashed #CBB273;
}
.pw-passcard__list span { font-weight: 600; }
.pw-passcard__list b { font-size: 16px; text-align: right; }
.pw-passcard__list em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: #6E5B2E; }
.pw-guide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.pw-guide ol { margin-top: 10px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.pw-guide b { display: block; color: var(--text); }

/* 기사 화면 */
.pw-read { display: grid; gap: 32px; padding-top: 24px; }
.pw-article { min-width: 0; }
.pw-article__head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pw-article__title { margin-top: 4px; font-family: var(--f-head); font-weight: 400; font-size: 28px; line-height: 1.36; letter-spacing: -.015em; }
.pw-article__lead { margin-top: 12px; font-size: 17px; line-height: 1.7; color: #3E3A33; font-weight: 500; }
.pw-article__by { margin-top: 12px; font-size: 13px; color: var(--muted); }
.pw-article__text { padding-top: 20px; font-size: 17px; line-height: 1.85; }
.pw-article__text p + p, .pw-article__rest > p:first-child { margin-top: 1.1em; }
.pw-article__rest > p { margin-top: 1.1em; }
.pw-article__rest:empty { display: none; }
.pw-figure { margin: 24px 0 0; }
.pw-figure img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); background: #FBF8F1; }
.pw-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.pw-owned {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; padding: 12px 14px;
  background: var(--ok-tint); border-radius: var(--r); color: #1E4D31;
}
.pw-owned svg { flex: none; width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pw-owned__title { font-weight: 700; }
.pw-owned__detail { font-size: 13px; }

.pw-lock { position: relative; margin-top: 8px; }
.pw-lock__fade { position: absolute; left: 0; right: 0; top: -132px; height: 132px; background: linear-gradient(rgba(243, 240, 232, 0), var(--bg) 88%); pointer-events: none; }
.pw-lock__box {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--primary);
  border-radius: var(--r); padding: 22px 18px 18px; display: grid; gap: 12px;
}
.pw-lock__eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--primary); }
.pw-lock__eyebrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pw-lock__title { font-family: var(--f-head); font-weight: 400; font-size: 21px; line-height: 1.4; }
.pw-lock__revoked { padding: 10px 12px; border-radius: var(--r); background: var(--danger-tint); color: var(--danger); font-size: 14px; font-weight: 600; }
.pw-lock__pass { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.pw-lock__buy { display: grid; gap: 8px; }
.pw-lock__login { font-size: 14px; color: var(--muted); }

/* 이용권(티켓) — 시그니처: 사용할 때 구멍이 뚫린다 */
.pw-ticket { display: grid; grid-template-columns: 72px minmax(0, 1fr); border-radius: 6px; overflow: hidden; background: var(--ticket); border: 1px solid #E6CF92; }
.pw-ticket__stub {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: var(--accent); color: var(--ticket-ink); font-size: 12px; font-weight: 700;
  border-right: 2px dashed #B98E2A; position: relative; padding: 10px 4px;
}
.pw-ticket__stub b { font-size: 28px; line-height: 1.1; }
.pw-ticket__main { padding: 12px 14px; min-width: 0; }
.pw-ticket__label { font-size: 13px; color: var(--ticket-ink); }
.pw-ticket__label b { font-size: 15px; }
.pw-ticket__holes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pw-hole {
  position: relative; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px dashed #A8822A; background: transparent;
}
.pw-hole.is-used, .pw-hole.is-punching {
  border: 0; background: var(--bg); box-shadow: inset 0 2px 3px rgba(60, 40, 0, .35);
}
.pw-hole.is-void { border-style: solid; border-color: #CDB98A; background: repeating-linear-gradient(45deg, transparent 0 3px, #D9C79C 3px 4px); }
.pw-hole.is-punching { animation: pw-punch .6s cubic-bezier(.2, .9, .3, 1.3) both; }
.pw-hole.is-punching::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--primary);
  animation: pw-ring .6s ease-out both;
}
@keyframes pw-punch { 0% { transform: scale(.2); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes pw-ring { 0% { opacity: 1; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) {
  .pw-hole.is-punching, .pw-hole.is-punching::after { animation: none; }
}
.pw-ticket__left { margin-top: 8px; font-size: 13px; color: var(--ticket-ink); }
.pw-ticket__used { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #D8BF80; display: grid; gap: 4px; font-size: 13px; }
.pw-ticket__used a { color: #4A3A14; }
.pw-ticket__used li::before { content: "– "; color: #A8822A; }
.pw-ticket--card.is-done { background: #F3EEDF; border-color: var(--line); }
.pw-ticket--card.is-done .pw-ticket__stub { background: #D9CFB6; border-right-color: #B3A684; }

.pw-next { border-top: 3px double var(--ink); padding-top: 14px; align-self: start; }
.pw-next ul { margin-top: 8px; }
.pw-next li { border-bottom: 1px solid var(--line); }
.pw-next a { display: grid; gap: 2px; padding: 12px 0; text-decoration: none; }
.pw-next__meta { font-size: 12px; color: var(--muted); }
.pw-next__title { font-family: var(--f-head); font-size: 17px; line-height: 1.4; }
.pw-next a:hover .pw-next__title { text-decoration: underline; text-underline-offset: 3px; }

/* 결제 */
.pw-crumb { padding-top: 18px; font-size: 14px; }
.pw-crumb a { color: var(--muted); text-decoration: none; }
.pw-page__title { margin-top: 6px; font-family: var(--f-head); font-weight: 400; font-size: 28px; line-height: 1.3; }
.pw-checkout__form { display: grid; gap: 14px; margin-top: 18px; }
.pw-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; }
.pw-step__title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.pw-step__title span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; }
.pw-checkout__for { display: grid; gap: 2px; padding: 10px 12px; margin-bottom: 12px; background: var(--soft); border-radius: var(--r); }
.pw-checkout__for span { font-size: 12px; color: var(--muted); }
.pw-checkout__for b { font-family: var(--f-head); font-weight: 400; font-size: 16px; line-height: 1.4; }
.pw-inline-note { padding: 10px 12px; margin-bottom: 12px; border-radius: var(--r); background: var(--warn-tint); color: #5E3A00; font-size: 14px; }
.pw-inline-note a { color: inherit; font-weight: 700; }
.pw-options { display: grid; gap: 8px; }
.pw-opt {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--surface);
}
.pw-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary); }
.pw-opt.is-disabled { opacity: .5; cursor: not-allowed; }
.pw-opt input, .pw-method input {
  appearance: none; -webkit-appearance: none; margin: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #A69E8D; background: var(--surface); display: grid; place-items: center;
}
.pw-opt input:checked, .pw-method input:checked { border-color: var(--primary); }
.pw-opt input:checked::after, .pw-method input:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.pw-opt__main { display: grid; gap: 2px; min-width: 0; }
.pw-opt__main b { font-size: 15px; }
.pw-opt__main small { font-size: 12px; color: var(--muted); }
.pw-opt__price { display: grid; justify-items: end; gap: 0; text-align: right; }
.pw-opt__price s { font-size: 12px; color: var(--muted); }
.pw-opt__price b { font-size: 16px; }
.pw-opt__price em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--primary); }
.pw-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pw-method {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 6px 12px; text-align: center;
  border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--surface);
}
.pw-method input { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; }
.pw-method input:checked::after { width: 8px; height: 8px; }
.pw-method:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary); }
.pw-method__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pw-method b { font-size: 14px; }
.pw-method small { font-size: 11px; color: var(--muted); line-height: 1.4; }
.pw-summary__rows { display: grid; gap: 8px; }
.pw-summary__rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pw-summary__rows dt { color: var(--muted); }
.pw-summary__rows dd { text-align: right; font-weight: 600; }
.pw-summary__total { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); }
.pw-summary__total dt { color: var(--text) !important; font-weight: 700; }
.pw-summary__total dd { font-size: 22px; font-weight: 800 !important; color: var(--primary); }
.pw-agree { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 12px; font-size: 14px; cursor: pointer; }
.pw-agree input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }
.pw-summary .pw-note { margin-top: 10px; }

.pw-gate {
  display: grid; justify-items: center; gap: 8px; margin-top: 18px; padding: 32px 20px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.pw-gate svg { width: 40px; height: 40px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.pw-gate__title { font-size: 18px; font-weight: 700; }
.pw-gate__desc { font-size: 14px; color: var(--muted); max-width: 380px; margin-bottom: 8px; }

/* 테스트 결제창 */
.pw-pg { width: min(400px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 10px; background: #fff; color: #222; box-shadow: 0 24px 64px rgba(0, 0, 0, .35); }
.pw-pg::backdrop { background: rgba(20, 18, 14, .55); }
.pw-pg__in { display: grid; gap: 14px; padding: 0 0 18px; }
.pw-pg__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; background: #2B2B2E; color: #fff; }
.pw-pg__tag { font-size: 11px; padding: 3px 8px; border-radius: 3px; background: #FFD666; color: #3A2C00; font-weight: 700; }
.pw-pg__rows { display: grid; gap: 6px; padding: 0 18px; font-size: 13px; }
.pw-pg__rows div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
.pw-pg__rows dt { color: #777; }
.pw-pg__amount { display: flex; align-items: baseline; justify-content: space-between; margin: 0 18px; padding: 12px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.pw-pg__amount b { font-size: 24px; }
.pw-pg__auth { display: grid; gap: 6px; margin: 0 18px; padding: 12px; border-radius: 6px; background: #F5F5F6; font-size: 13px; }
.pw-pg__field { display: flex; justify-content: space-between; gap: 8px; }
.pw-pg__field span { color: #666; }
.pw-pg__easy { font-weight: 600; }
.pw-pg__warn { margin: 0 18px; font-size: 12px; color: #8A5A00; }
.pw-pg__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 0 18px; }

/* 결제 결과 */
.pw-result { padding-top: 28px; }
.pw-result__head { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 8px 0 18px; }
.pw-result__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok); }
.pw-result__icon svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pw-result__head--fail .pw-result__icon { background: var(--danger); }
.pw-result__desc { font-size: 15px; color: var(--muted); }
.pw-receipt { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px; }
.pw-receipt div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--soft); font-size: 14px; }
.pw-receipt div:last-child { border-bottom: 0; }
.pw-receipt dt { color: var(--muted); flex: none; }
.pw-receipt dd { text-align: right; font-weight: 600; min-width: 0; }
.pw-receipt__total dd { font-size: 18px; color: var(--danger); }
.pw-receipt--mail { margin: 12px 0; }
.pw-result__actions { display: grid; gap: 8px; margin-top: 16px; }
.pw-mailrow { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 10px; align-items: start; margin-top: 18px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--r); font-size: 14px; }
.pw-mailrow svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.pw-mailrow .pw-linkbtn { grid-column: 2; justify-self: start; font-size: 14px; }
.pw-result > div > .pw-note { margin-top: 12px; }
.pw-mail__meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.pw-mail__body { display: grid; gap: 8px; font-size: 14px; margin: 10px 0 16px; }

/* 내 이용 내역 */
.pw-my { padding-top: 24px; }
.pw-my__grid { display: grid; gap: 16px; margin-top: 18px; }
.pw-my__sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; display: grid; gap: 12px; align-content: start; }
.pw-my__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pw-my__head h2 { font-size: 17px; }
.pw-my__total { font-size: 14px; color: var(--muted); }
.pw-my__total b { font-size: 20px; color: var(--text); }
.pw-tickets { display: grid; gap: 10px; }
.pw-owned-list { display: grid; }
.pw-owned-list li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--soft); }
.pw-owned-list li:last-child { border-bottom: 0; }
.pw-owned-list__title { font-family: var(--f-head); font-size: 16px; line-height: 1.4; }
.pw-owned-list li.is-revoked .pw-owned-list__title { color: var(--muted); text-decoration: line-through; }
.pw-owned-list__meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pw-orders { display: grid; }
.pw-order { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--soft); }
.pw-order:last-child { border-bottom: 0; }
.pw-order__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pw-order__id { font-size: 12px; color: var(--muted); }
.pw-order__name { font-weight: 600; }
.pw-order__meta { font-size: 13px; color: var(--muted); }
.pw-order__meta b { color: var(--text); }
.pw-order__state { font-size: 13px; color: var(--muted); }
.pw-order > .pw-linkbtn { justify-self: start; font-size: 13px; min-height: 32px; }
.pw-reqform { display: grid; gap: 10px; margin-top: 6px; padding: 12px; background: var(--soft); border-radius: var(--r); }
.pw-reqform__expect { font-size: 13px; font-weight: 600; }
.pw-reqform__btns { display: flex; justify-content: flex-end; gap: 8px; }
.pw-field { display: grid; gap: 4px; font-size: 13px; }
.pw-field span { color: var(--muted); font-weight: 600; }
.pw-field input, .pw-field select { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 15px; }

/* 대화상자 */
.pw-modal { width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, .3); }
.pw-modal::backdrop, .pw-sheet::backdrop { background: rgba(20, 18, 14, .5); }
.pw-modal__in { display: grid; gap: 12px; padding: 24px 20px 20px; }
.pw-modal__title { font-size: 19px; font-weight: 700; }
.pw-modal__body { font-size: 14px; color: var(--muted); }
.pw-modal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.pw-modal .pw-receipt { padding: 2px 12px; }
.pw-effect { padding: 10px 12px; border-radius: var(--r); background: var(--warn-tint); color: #5E3A00; font-size: 14px; font-weight: 600; }
.pw-rules { display: grid; gap: 8px; padding-left: 18px !important; list-style: disc !important; font-size: 14px; }
.pw-mast--sm { font-size: 26px; color: var(--primary); }
.pw-login__idp { display: none; gap: 12px; }
.pw-login__site { display: grid; gap: 12px; }
[data-step="idp"] .pw-login__site { display: none; }
[data-step="idp"] .pw-login__idp { display: grid; }
.pw-idp__tag { justify-self: start; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 3px; background: #DCE6F2; color: #1D3A5C; }
.pw-idp__scope { font-size: 13px; color: var(--muted); padding: 10px 12px; background: var(--soft); border-radius: var(--r); }
.pw-login__idp .pw-field input { background: #F7F7F5; }

/* 공고 대응표 */
.pw-mapbtn {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border-radius: 999px; border: 0; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(26, 25, 22, .3);
}
.pw-mapbtn svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.pw-sheet {
  margin: 0 0 0 auto; width: min(460px, 100%); height: 100%; max-height: 100%; max-width: 100%;
  border: 0; padding: 0; background: var(--surface); color: var(--text); box-shadow: -12px 0 40px rgba(0, 0, 0, .2);
}
.pw-sheet__in { padding: 18px 16px 24px; }
.pw-sheet__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 3px double var(--ink); }
.pw-sheet__head h2 { font-family: var(--f-head); font-weight: 400; font-size: 24px; margin-top: 2px; }
.pw-sheet__list { display: grid; }
.pw-sheet__list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pw-sheet__no { font-size: 13px; font-weight: 700; color: var(--primary); padding-top: 1px; }
.pw-sheet__need { font-weight: 700; font-size: 14px; }
.pw-sheet__show { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pw-sheet__go { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; min-height: 32px; font-size: 13px; font-weight: 700; color: var(--primary); }
.pw-sheet__foot { margin-top: 14px; font-size: 12px; color: var(--muted); }

.pw-toast {
  position: fixed; left: 50%; bottom: 72px; z-index: 60; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 6px;
  background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.pw-toast.is-in { animation: pw-toast .25s ease-out; }
@keyframes pw-toast { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .pw-toast.is-in { animation: none; } }

.pw-footer { border-top: 3px double var(--ink); padding: 20px 0 8px; font-size: 13px; color: var(--muted); }
.pw-footer__mast { font-family: var(--f-head); font-size: 22px; color: var(--text); }
.pw-footer__links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.pw-footer__links button { background: none; border: 0; padding: 0; min-height: 32px; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.demo-notice { padding: 14px 16px 84px; text-align: center; font-size: 12px; color: var(--muted); }

/* 관리자 */
.pw--admin { background: #EFEBE1; }
.pw-admin { display: grid; min-height: calc(100vh - 44px); }
.pw-side { background: var(--ink-2); color: #DDD6C6; padding: 12px 16px; display: grid; gap: 8px; align-content: start; }
.pw-side__brand { display: flex; align-items: baseline; gap: 8px; color: #fff; font-size: 13px; }
.pw-mast--side { font-size: 24px; }
.pw-side__group { display: none; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #A49C89; }
.pw-side__nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.pw-side__nav::-webkit-scrollbar { display: none; }
.pw-side__nav a {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: var(--r);
  text-decoration: none; color: #CFC7B5; font-size: 14px; font-weight: 600;
}
.pw-side__nav a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pw-side__nav a.is-on { background: var(--accent); color: var(--ticket-ink); }
.pw-side__back { display: none; }
.pw-admin__main { min-width: 0; padding: 20px 16px 40px; }
.pw-apage { display: grid; gap: 16px; max-width: 1040px; }
.pw-apage__head h1 { margin-top: 2px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.pw-apage__head p:last-child { margin-top: 4px; font-size: 14px; color: var(--muted); }
.pw-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.pw-panel--flush { padding: 0; overflow: hidden; }
.pw-panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; }
.pw-panel--flush .pw-panel__head { padding: 14px 16px 0; }
.pw-panel__head h2 { font-size: 16px; }
.pw-panel__aside { font-size: 13px; color: var(--muted); }
.pw-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pw-prices div { padding: 10px 12px; background: var(--soft); border-radius: var(--r); }
.pw-prices dt { font-size: 12px; color: var(--muted); }
.pw-prices dd { font-size: 17px; font-weight: 700; }
.pw-prices small { font-size: 12px; color: var(--primary); font-weight: 700; }
.pw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pw-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 2px; }
.pw-stat span { font-size: 12px; color: var(--muted); }
.pw-stat b { font-size: 18px; }
.pw-stat--warn b { color: var(--warn); }
.pw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pw-chips--scroll::-webkit-scrollbar { display: none; }
.pw-chip {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--text);
}
.pw-chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 관리자 표: 모바일은 카드, 넓은 화면은 표 */
.pw-rows { display: grid; font-size: 14px; }
.pw-rows__head { display: none; }
.pw-rows__row { display: grid; gap: 6px 12px; padding: 14px 16px; border-top: 1px solid var(--soft); align-items: center; }
.pw-rows__row.is-me { background: #FFF8E6; }
.pw-rows__row.is-alert { box-shadow: inset 3px 0 0 var(--warn); }
.pw-rows__row small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.pw-rows__muted { color: var(--muted); font-size: 13px; }
.pw-rows__log { padding: 4px 16px 14px 28px; background: var(--soft); border-top: 1px dashed var(--line); }
.pw-rows__log ol { display: grid; gap: 6px; padding-top: 10px; font-size: 13px; border-left: 2px solid #C9BFA9; padding-left: 12px; }
.pw-rows__log li span { display: inline-block; min-width: 82px; color: var(--muted); margin-right: 6px; }

.pw-rows--posts .pw-rows__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "post switch" "date sales"; }
.pw-rows--posts .pw-rows__row > :nth-child(1) { grid-area: post; }
.pw-rows--posts .pw-rows__row > :nth-child(2) { grid-area: date; }
.pw-rows--posts .pw-rows__row > :nth-child(3) { grid-area: sales; justify-self: end; font-size: 13px; }
.pw-rows--posts .pw-rows__row > :nth-child(4) { grid-area: switch; }
.pw-post { display: grid; gap: 2px; min-width: 0; }
.pw-post__sec { font-size: 12px; font-weight: 700; color: var(--primary); }
.pw-post__title { font-weight: 600; text-decoration: none; line-height: 1.45; }
.pw-post__title:hover { text-decoration: underline; }
.pw-switch-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none; }
.pw-switch-btn__track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #C9C1B0; transition: background .15s; }
.pw-switch-btn__knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.pw-switch-btn[aria-checked="true"] .pw-switch-btn__track { background: var(--primary); }
.pw-switch-btn[aria-checked="true"] .pw-switch-btn__knob { transform: translateX(18px); }
.pw-switch-btn__label { min-width: 28px; font-size: 13px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .pw-switch-btn__track, .pw-switch-btn__knob { transition: none; } }

.pw-rows--pay .pw-rows__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "order status" "product product" "member amount" "action action"; }
.pw-rows--pay .c-order { grid-area: order; }
.pw-rows--pay .c-status { grid-area: status; justify-self: end; }
.pw-rows--pay .c-product { grid-area: product; font-weight: 600; }
.pw-rows--pay .c-member { grid-area: member; }
.pw-rows--pay .c-amount { grid-area: amount; justify-self: end; text-align: right; font-weight: 700; }
.pw-rows--pay .c-action { grid-area: action; display: flex; flex-wrap: wrap; gap: 6px; }

.pw-rows--ent .pw-rows__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "member status" "product product" "via time"; }
.pw-rows--ent .c-member { grid-area: member; }
.pw-rows--ent .c-status { grid-area: status; justify-self: end; text-align: right; }
.pw-rows--ent .c-product { grid-area: product; font-weight: 600; }
.pw-rows--ent .c-via { grid-area: via; font-size: 13px; }
.pw-rows--ent .c-time { grid-area: time; justify-self: end; font-size: 13px; color: var(--muted); }

.pw-rows--ledger .pw-rows__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "member delta" "product bal" "time time"; }
.pw-rows--ledger .c-time { grid-area: time; font-size: 12px; color: var(--muted); }
.pw-rows--ledger .c-member { grid-area: member; }
.pw-rows--ledger .c-product { grid-area: product; font-weight: 600; }
.pw-rows--ledger .c-delta { grid-area: delta; justify-self: end; font-weight: 800; font-size: 16px; }
.pw-rows--ledger .c-bal { grid-area: bal; justify-self: end; color: var(--muted); }
.c-delta.is-plus { color: var(--ok); }
.c-delta.is-minus { color: var(--primary); }

/* 본문 보호 점검 */
.pw-protect { display: grid; gap: 16px; }
.pw-code {
  margin: 0; padding: 14px; border-radius: var(--r); background: #1E1D1A; color: #E9E4D8; overflow-x: auto;
  font-family: var(--f-mono); font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-all;
}
.pw-protect .pw-note { margin-top: 10px; }
.pw-checks { display: grid; }
.pw-checks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--soft); }
.pw-checks li:last-child { border-bottom: 0; }
.pw-checks__name { font-weight: 700; font-size: 14px; }
.pw-checks__rule { grid-column: 1; font-size: 13px; color: var(--muted); }
.pw-checks .pw-tag { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.pw-probes { display: grid; }
.pw-probe { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--soft); }
.pw-probe:last-child { border-bottom: 0; }
.pw-probe__label { font-weight: 700; font-size: 14px; }
.pw-probe__sub { font-size: 13px; color: var(--muted); }
.pw-probe__url { display: block; margin-top: 4px; font-family: var(--f-mono); font-size: 11.5px; color: #5E584C; word-break: break-all; }
.pw-probe__res { display: flex; align-items: center; gap: 8px; }
.pw-probe__img { width: 160px; height: auto; border: 1px solid var(--line); border-radius: var(--r); }

/* 넓은 화면 */
@media (min-width: 720px) {
  .pw-wrap { padding-left: 24px; padding-right: 24px; }
  .pw-sections { margin: 0 -24px; padding: 0 20px; }
  .pw-card { grid-template-columns: minmax(0, 1fr) 132px; }
  .pw-card__art { aspect-ratio: 4 / 3; }
  .pw-card--lead { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; }
  .pw-card--lead .pw-card__art { aspect-ratio: 4 / 3; }
  .pw-card--lead .pw-card__title { font-size: 30px; }
  .pw-article__title { font-size: 34px; }
  .pw-lock__box { padding: 26px 26px 22px; }
  .pw-lock__buy { grid-template-columns: 1fr 1fr; }
  .pw-step { padding: 22px; }
  .pw-prices { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pw-my__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pw-my__sec--wide { grid-column: 1 / -1; }
  .pw-probe { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .pw-probe__img { grid-column: 1 / -1; }
  .pw-result__actions { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1000px) {
  .pw-home__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
  .pw-rail { position: sticky; top: 16px; padding-top: 16px; }
  .pw-read { grid-template-columns: minmax(0, 680px) 280px; justify-content: space-between; }
  .pw-next { position: sticky; top: 16px; }

  .pw-admin { grid-template-columns: 228px minmax(0, 1fr); }
  .pw-side { padding: 22px 14px; gap: 14px; align-content: start; }
  .pw-side__brand { padding: 0 8px 12px; border-bottom: 1px solid #3E3B35; }
  .pw-side__group { display: block; padding: 0 8px; }
  .pw-side__nav { flex-direction: column; margin: 0; padding: 0; overflow: visible; }
  .pw-side__back { display: block; margin-top: 8px; padding: 10px 8px; font-size: 13px; color: #A49C89; }
  .pw-admin__main { padding: 28px 32px 48px; }

  .pw-rows__head {
    display: grid; gap: 12px; padding: 12px 16px; margin-top: 8px; background: var(--soft);
    font-size: 12px; font-weight: 700; color: var(--muted);
  }
  .pw-rows__row { grid-template-areas: none !important; padding: 12px 16px; }
  .pw-rows__row > * { grid-area: auto !important; justify-self: stretch !important; text-align: left !important; }
  .pw-rows--posts .pw-rows__head, .pw-rows--posts .pw-rows__row { grid-template-columns: minmax(0, 1fr) 100px 150px 120px; }
  .pw-rows--pay .pw-rows__head, .pw-rows--pay .pw-rows__row { grid-template-columns: 158px 112px minmax(0, 1fr) 104px 96px 190px; }
  .pw-rows--pay .c-action { justify-content: flex-end; }
  .pw-rows--ent .pw-rows__head, .pw-rows--ent .pw-rows__row { grid-template-columns: 150px minmax(0, 1fr) 160px 96px 130px; }
  .pw-rows--ledger .pw-rows__head, .pw-rows--ledger .pw-rows__row { grid-template-columns: 96px 200px minmax(0, 1fr) 64px 64px; }
  .pw-rows--ledger .c-time { font-size: 13px; }
  .pw-rows__log { padding-left: 32px; }

  .pw-protect { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .pw-panel--wide { grid-column: 1 / -1; }
}
