/* ═══════════════════════════════════════════════════════════════
   클로즈드 플레이테스트 전용 스타일 (style.css 위에 덮음)
   ═══════════════════════════════════════════════════════════════ */

a { color: inherit; text-decoration: none; }
.pt-link { color: var(--accent); }
.pt-link:hover { text-decoration: underline; }

/* ─── 헤더 ──────────────────────────────────────────────────── */
.pt-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 8px 18px;
  background: rgba(8,10,14,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.pt-logo { display: flex; align-items: baseline; gap: 8px; }
.pt-logo-main { font-size: 22px; font-weight: 900; letter-spacing: 3px; color: var(--accent); }
.pt-logo-sub { font-size: 11px; color: var(--text-dim); letter-spacing: 1px; }
.pt-menu { display: flex; gap: 14px; font-size: 13px; color: #9a9ca8; }
.pt-menu a:hover { color: var(--accent); }
.pt-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pt-nick { font-size: 12px; color: #9a9ca8; }
.pt-lang { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.pt-lang button { background: transparent; color: var(--text-dim); font-size: 11px; font-weight: 700; padding: 4px 10px; }
.pt-lang button.on { background: var(--accent-dim); color: var(--accent); }

.pt-screen { max-width: 980px; margin: 0 auto; padding: 20px 16px 90px; }
.pt-screen-battle { max-width: 940px; padding-top: 10px; }
.pt-loading { text-align: center; padding: 60px; color: var(--text-dim); }

/* ─── 공용 ──────────────────────────────────────────────────── */
.pt-input {
  background: #080b10; color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 10px; font-family: var(--font-sans); font-size: 14px;
}
.pt-input:focus { outline: none; border-color: var(--gold-line); }
.pt-note { font-size: 12px; color: #6b6f7e; margin: 6px 0; line-height: 1.5; }
.pt-row-end { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.pt-row-between { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pt-center { text-align: center; }
.pt-big { font-size: 16px; padding: 12px 32px; }
.pt-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.pt-sub { color: #8a8e9c; margin-bottom: 16px; }
.pt-chip { display: inline-block; font-size: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 2px 9px; }
.pt-arrow { color: var(--text-dim); margin: 0 4px; font-size: 11px; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.selected-action { color: var(--accent); border-color: var(--gold-line); }

.pt-toast {
  position: fixed; left: 50%; bottom: 80px; transform: translate(-50%, 20px);
  background: #10141e; border: 1px solid var(--gold-line); color: var(--text);
  padding: 10px 18px; border-radius: var(--radius-lg); font-size: 13px;
  opacity: 0; transition: all .3s; z-index: 300; max-width: 90vw; text-align: center;
}
.pt-toast.show { opacity: 1; transform: translate(-50%, 0); }

.pt-modal-wrap {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4,5,8,0.7); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.pt-modal {
  background: linear-gradient(160deg, #111828, #0a0e18);
  border: 1px solid var(--gold-line); border-radius: var(--radius-lg);
  padding: 22px 24px; width: min(480px, 100%); max-height: 90vh; overflow: auto;
  box-shadow: 0 0 60px rgba(0,0,0,0.7);
}

/* ─── 랜딩 ──────────────────────────────────────────────────── */
.pt-notice {
  text-align: center; font-size: 12px; color: var(--orange);
  border: 1px solid rgba(200,136,58,0.3); border-radius: var(--radius);
  padding: 6px 10px; margin-bottom: 18px; background: rgba(200,136,58,0.05);
}
.pt-hero {
  text-align: center; padding: 56px 0 30px;
  background: radial-gradient(ellipse 60% 70% at 50% 40%, rgba(200,168,78,0.08), transparent 70%);
}
.pt-hero-logo { font-size: 72px; font-weight: 900; letter-spacing: 12px; color: var(--accent); text-shadow: 0 0 40px rgba(200,168,78,0.25); }
.pt-hero-sub { font-size: 14px; letter-spacing: 6px; color: #8a8e9c; margin-top: 4px; }
.pt-lore { position: relative; max-width: 640px; margin: 0 auto 30px; padding: 28px 30px; border-left: 1px solid var(--gold-line); }
.pt-lore p { margin-bottom: 14px; line-height: 1.95; color: #cfc6b8; font-size: 15px; }
.pt-skip { position: absolute; top: -10px; right: 0; font-size: 12px; padding: 3px 12px; }

/* ─── 입장 ──────────────────────────────────────────────────── */
.pt-auth { max-width: 420px; margin: 20px auto; }
.pt-tabs { display: flex; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.pt-tabs button { flex: 1; background: transparent; color: var(--text-dim); padding: 10px; font-size: 14px; font-weight: 700; border-bottom: 2px solid transparent; }
.pt-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.pt-form { display: flex; flex-direction: column; gap: 14px; }
.pt-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #9a9ca8; }
.pt-form small { color: #5c606e; font-size: 11px; }
.pt-form-err { color: var(--red); font-size: 13px; min-height: 18px; }
.pt-pin { display: flex; gap: 10px; }
.pt-pin input {
  width: 52px; height: 58px; text-align: center; font-size: 26px; font-weight: 800;
  background: #080b10; color: var(--accent); border: 1px solid var(--border); border-radius: var(--radius);
}
.pt-pin input:focus { outline: none; border-color: var(--accent); }

/* ─── 학파 지도 ─────────────────────────────────────────────── */
.pt-faction { text-align: center; }
.pt-map { width: min(520px, 100%); height: auto; margin: 0 auto; display: block; }
.pt-fnode { cursor: pointer; transition: transform .2s; }
.pt-fnode circle { transition: all .2s; }
.pt-fnode:hover circle, .pt-fnode:focus circle { stroke-width: 4; filter: drop-shadow(0 0 10px currentColor); }
.pt-fnode:focus { outline: none; }
.pt-fnode.empty circle.pt-fcore { stroke-dasharray: 5 4; opacity: .75; }   /* 아직 입문 안 한 학파 (술사가 하나라도 있을 때) */
.pt-fnode .pt-fring { fill: none; stroke-width: 2; opacity: .8; }          /* 지금 술사 */
.pt-fdesc { min-height: 44px; font-size: 14px; color: #b5ad9f; max-width: 520px; margin: 8px auto 0; }

/* ─── 본거지 ────────────────────────────────────────────────── */
.pt-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius);
  border: 1px solid var(--gold-line); background: var(--accent-dim); font-size: 13px;
}
.pt-banner span { flex: 1; }
.pt-banner-battle { color: var(--green); border-color: rgba(95,170,138,0.4); background: rgba(95,170,138,0.06); }
.pt-refill { font-size: 12px; color: var(--green); margin: -4px 0 8px; font-family: var(--font-mono); }
.pt-navbtn { display: block; text-align: center; width: 100%; font-size: 15px; padding: 13px 8px; white-space: normal; line-height: 1.35; }
.pt-battle-btn { background: linear-gradient(135deg, #6ab898, #3a8868); color: #040e08; }

#pt-notes-tab {
  position: fixed; left: 0; top: 40%; z-index: 30;
  writing-mode: vertical-rl; padding: 12px 6px;
  background: #10141e; color: var(--accent); border: 1px solid var(--gold-line); border-left: none;
  border-radius: 0 8px 8px 0; font-size: 12px; font-weight: 700; letter-spacing: 1px;
}
.pt-drawer-wrap { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,0); transition: background .25s; }
.pt-drawer-wrap.open { background: rgba(0,0,0,0.5); }
.pt-drawer {
  position: absolute; left: 0; top: 0; bottom: 0; width: min(440px, 92vw);
  background: linear-gradient(170deg, #121724, #0a0d15); border-right: 1px solid var(--gold-line);
  padding: 20px; overflow-y: auto; transform: translateX(-100%); transition: transform .25s;
}
.pt-drawer-wrap.open .pt-drawer { transform: translateX(0); }
.pt-note-item { border-top: 1px solid var(--border); padding: 12px 0; }
.pt-note-head { margin-bottom: 6px; }
.pt-slot-no { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; background: var(--accent-dim); color: var(--accent); font-size: 11px; font-weight: 800; }
.pt-note-inputs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-bottom: 6px; }
.pt-note-text { font-size: 13px; color: #b5ad9f; font-style: italic; line-height: 1.6; }

/* ─── 제작 ──────────────────────────────────────────────────── */
.alch-slot { position: relative; }
.pt-slot-order { position: absolute; top: 4px; left: 8px; font-size: 10px; color: var(--text-dim); font-weight: 700; }
.pt-recipe-master { border-color: rgba(200,168,78,0.35) !important; }
.pt-result { display: flex; flex-direction: column; align-items: center; }
.pt-micro { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--gold-line); border-radius: var(--radius); text-align: center; }
.pt-micro-q { font-size: 13px; margin-bottom: 8px; }
.pt-micro-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pt-micro-btns .btn { font-size: 12px; padding: 4px 12px; }

/* ─── 창고 ──────────────────────────────────────────────────── */
.mini-card { position: relative; }
.pt-discard { position: absolute; top: 2px; right: 2px; background: rgba(196,76,66,0.2); color: #ff8a80; border-radius: 4px; font-size: 11px; padding: 1px 4px; }

/* ─── 전투 ──────────────────────────────────────────────────── */
.pt-battle { height: auto; min-height: calc(100vh - 110px); }
.pt-difficulty { max-width: 420px; margin: 48px auto; padding: 0 16px; text-align: center; }
.pt-difficulty h2 { font-size: 18px; margin-bottom: 20px; }
.pt-diff-list { display: flex; flex-direction: column; gap: 10px; }
.pt-diff { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; width: 100%; }
.pt-diff b { font-size: 16px; }
.pt-diff span { font-size: 12px; opacity: .8; }
.pt-battle .log-panel { max-height: 220px; color: #8a8ea0; }
.pt-abandon { font-size: 10px; padding: 2px 8px; margin-left: 8px; }
.pt-hint { text-align: center; font-size: 11px; color: #6b6f7e; min-height: 16px; }
.crystal { overflow: visible; }
/* 크리스탈 치유저항 — 다음 치유가 먼저 깎이므로 눈에 띄게 */
.crystal .crystal-healres {
  top: 2px; right: 3px; font-size: 11px; line-height: 1;
  padding: 1px 4px; border-radius: 4px;
  background: rgba(255, 136, 68, 0.18); border: 1px solid rgba(255, 136, 68, 0.55);
}
.pt-float {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  pointer-events: none; z-index: 20; white-space: nowrap;
  animation: pt-float-up 2.1s ease-out forwards;
}
.pt-float b { font-size: 22px; font-weight: 900; text-shadow: 0 0 8px rgba(0,0,0,0.9); }
.pt-float span { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 3px; background: rgba(8,10,14,0.85); }
.pt-float-hit b { color: #ff6b6b; }
.pt-float-hit span { color: #ffb4a8; }
.pt-float-heal b { color: #69dba8; }
.pt-float-heal span { color: #b6f0d5; }
.pt-float-none b { color: #888; }
@keyframes pt-float-up {
  0%   { opacity: 0; transform: translate(-50%, 8px); }
  12%  { opacity: 1; transform: translate(-50%, -6px); }
  75%  { opacity: 1; transform: translate(-50%, -26px); }
  100% { opacity: 0; transform: translate(-50%, -40px); }
}
.pt-shimmer { animation: pt-shimmer 1s ease-out; }
@keyframes pt-shimmer { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8); } 100% { box-shadow: 0 0 0 14px rgba(255,255,255,0); } }
.pt-reveal { animation: pt-reveal .6s ease-out; }
@keyframes pt-reveal { 0% { transform: scale(2); } 100% { transform: scale(1); } }
.card-comp.is-unknown .card-arch { color: #c084fc; font-weight: 800; letter-spacing: 2px; }

/* ─── 2층 아이콘: 번짐(청록)·치유저항(주황, 크리스탈 ⛨와 같은 색) ─── */
.hand-row { gap: 10px; }
.card-comp { position: relative; }
.card-tag.mod-hr, .card-tag.mod-spread, .card-tag.mod-echo {
  font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
  border: 1px solid transparent; line-height: 1.3; white-space: nowrap;
}
.card-tag.mod-hr     { color: #ffb48a; background: rgba(255,136,68,0.14); border-color: rgba(255,136,68,0.35); }
.card-tag.mod-hr-2   { background: rgba(255,136,68,0.24); }
.card-tag.mod-hr-3   { background: rgba(255,136,68,0.36); color: #ffd2b8; border-color: rgba(255,136,68,0.7); }
.card-tag.mod-spread   { color: #9beff2; background: rgba(92,225,230,0.12); border-color: rgba(92,225,230,0.35); }
.card-tag.mod-spread-2 { background: rgba(92,225,230,0.22); }
.card-tag.mod-spread-3 { background: rgba(92,225,230,0.34); color: #d4fbfc; border-color: rgba(92,225,230,0.7); }
.card-tag.mod-echo   { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); }
.card-tag.mini { font-size: 10px; padding: 1px 4px; border-radius: 3px; }
.mini-card-stats { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; margin-top: 2px; }

/* 번짐: 카드 밖으로 번지는 청록 글로우. 바깥 그림자라 카드 안쪽은 칠하지 않는다 */
.card-comp.mod-spread::before, .mini-card.mod-spread::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
}
:is(.card-comp, .mini-card).mod-spread-1::before { box-shadow: 0 0 8px 1px rgba(92,225,230,0.35); }
:is(.card-comp, .mini-card).mod-spread-2::before { box-shadow: 0 0 14px 3px rgba(92,225,230,0.55); }
:is(.card-comp, .mini-card).mod-spread-3::before { box-shadow: 0 0 20px 5px rgba(92,225,230,0.7); animation: pt-spread-pulse 2.4s ease-in-out infinite; }
@keyframes pt-spread-pulse {
  0%, 100% { box-shadow: 0 0 16px 4px rgba(92,225,230,0.55); }
  50%      { box-shadow: 0 0 26px 8px rgba(92,225,230,0.8); }
}

/* 치유저항: 안쪽 주황 봉인선. 1단계 한 줄, 2단계 두 줄, 3단계 두꺼운 두 줄 + 안쪽 번짐 */
.card-comp.mod-hr::after, .mini-card.mod-hr::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: 2px solid rgba(255,136,68,0.5);
}
:is(.card-comp, .mini-card).mod-hr-2::after { border-color: rgba(255,136,68,0.6); outline: 2px solid rgba(255,136,68,0.45); outline-offset: -6px; }
:is(.card-comp, .mini-card).mod-hr-3::after {
  border: 3px solid rgba(255,136,68,0.8);
  outline: 2px solid rgba(255,136,68,0.65); outline-offset: -8px;
  box-shadow: inset 0 0 14px rgba(255,136,68,0.3);
}
.pt-discard { z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  :is(.card-comp, .mini-card).mod-spread-3::before { animation: none; }
}

.pt-gauge {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center;
  font-size: 11px; padding: 7px 14px; min-height: 34px;
  background: linear-gradient(135deg, #080b10, #060810);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.pt-gauge-title { color: var(--text-dim); font-weight: 700; letter-spacing: .5px; }
.pt-gauge-item { display: flex; align-items: center; gap: 5px; }
.pt-gauge-bar { width: 70px; height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.pt-gauge-bar span { display: block; height: 100%; border-radius: 3px; transition: width .4s; }
.pt-gauge-echo { font-size: 8px; letter-spacing: 1px; min-width: 10px; }
/* 흩어짐 적립·상쇄 순간 강조 */
.pt-gauge-pulse { animation: pt-gauge-pulse 1.2s ease-out; border-radius: 4px; }
@keyframes pt-gauge-pulse { 0% { background: rgba(255,255,255,.18); } 100% { background: transparent; } }
.pt-gauge-delta { font-weight: 800; color: #f4d35e; animation: pt-gauge-delta 1.8s ease-out forwards; }
.pt-gauge-delta.neg { color: #8fb8ff; }
@keyframes pt-gauge-delta { 0% { opacity: 0; transform: translateY(4px); } 15% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* ─── 피드백 ────────────────────────────────────────────────── */
#pt-fb-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  background: linear-gradient(135deg, #1a2030, #10141e); color: var(--accent);
  border: 1px solid var(--gold-line); border-radius: 20px;
  padding: 9px 18px; font-size: 13px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
#pt-fb-btn:hover { filter: brightness(1.2); }
.pt-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-kind.on, .pt-opt.on { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* ─── 룰 · FAQ · 설문 ───────────────────────────────────────── */
.pt-page { max-width: 720px; margin: 0 auto; }
.pt-sec { margin: 18px 0; }
.pt-sec h3 { font-size: 15px; color: var(--accent); margin-bottom: 6px; }
.pt-sec p, .pt-sec li { line-height: 1.85; color: #cfc6b8; }
.pt-sec ul { padding-left: 20px; }
.pt-faq { border-bottom: 1px solid var(--border); padding: 12px 0; }
.pt-faq summary { cursor: pointer; font-weight: 700; color: var(--text); }
.pt-faq p { margin-top: 8px; line-height: 1.85; color: #b5ad9f; }
.pt-progress { height: 4px; background: var(--border); border-radius: 2px; margin: 12px 0 4px; overflow: hidden; }
.pt-progress span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.pt-q { margin: 22px 0; }
.pt-q-text { font-weight: 700; margin-bottom: 10px; }
.pt-scale, .pt-opts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pt-scale .btn { min-width: 38px; }
.pt-grid-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(28,34,50,0.6); flex-wrap: wrap; }

@media (max-width: 700px) {
  .pt-menu { display: none; }
  .pt-hero-logo { font-size: 52px; }
  .crystal { width: 58px; }
}
