/* ============================================================
   포트폴리오 제안 — QFA 모바일 도구
   ----------------------------
   메인 사이트(style.css) 토큰 위에 올려놓는 페이지 전용 레이어.
   - 모바일 first, 한 손 조작 최적화
   - 메인 사이트의 Navy + Blue + Pretendard 톤 유지
   - 40-60대 친화 폰트 사이즈와 44px+ 터치 타깃
   ============================================================ */

:root {
  /* 홈페이지 토큰(--primary-*)와 동기화. 페이지 전용은 ps- prefix 유지. */
  --ps-bg:        #F6F6F6;   /* secondary-light-gray (homepage) */
  --ps-bg-elev:   #FFFFFF;
  --ps-bg-tint:   #EAF1FB;
  --ps-ink:       #0A192F;   /* primary-deep-navy */
  --ps-ink-2:     #1E3A5F;   /* primary-royal-blue */
  --ps-ink-soft:  #374151;   /* secondary-dark-gray */
  --ps-ink-mute:  #6B7280;
  --ps-ink-faint: #9CA3AF;
  --ps-rule:      #E5E7EB;   /* secondary-medium-gray */
  --ps-rule-soft: #EFF2F7;
  --ps-accent:    #3B82F6;   /* primary-blue-accent */
  --ps-accent-2:  #1E40AF;
  --ps-accent-soft: #DBEAFE;
  --ps-up:        #10B981;
  --ps-down:      #EF4444;

  --ps-shadow-sm: 0 2px 8px rgba(10, 25, 47, 0.06);
  --ps-shadow-md: 0 4px 20px rgba(10, 25, 47, 0.08);
  --ps-shadow-lg: 0 12px 32px rgba(10, 25, 47, 0.12);

  --ps-safe-top:    env(safe-area-inset-top);
  --ps-safe-bottom: env(safe-area-inset-bottom);
}

/* ─── reset on this page ─────────────────────────── */
body.ps-body {
  margin: 0;
  background: var(--ps-bg);
  color: var(--ps-ink);
  font-family: var(--body-font, 'Pretendard', sans-serif);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  /* 메인 사이트의 fixed header를 사용하지 않으므로 padding 없음 */
}
.ps-body, .ps-body * { box-sizing: border-box; }
.ps-body [hidden] { display: none !important; }
.ps-body button,
.ps-body input { font: inherit; color: inherit; background: none; border: none; padding: 0; }
.ps-body button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ps-body input { -webkit-appearance: none; appearance: none; border-radius: 0; }
.ps-body button:focus-visible,
.ps-body input:focus-visible,
.ps-body a:focus-visible {
  outline: 2px solid var(--ps-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.ps-body ::selection { background: var(--ps-accent); color: #fff; }
.ps-body code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.92em;
  letter-spacing: 0.02em;
}

/* ============================================================
   APP SHELL
   ============================================================ */
.ps-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: max(24px, var(--ps-safe-bottom));
}

/* ─── topbar ─── 홈페이지 헤더와 동일한 흰 배경 톤 ─── */
.ps-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + var(--ps-safe-top));
  background: #fff;
  color: var(--ps-ink);
  border-bottom: 1px solid var(--ps-rule);
}
.ps-topbar__home,
.ps-topbar__action {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ps-ink-soft);
  border-radius: 8px;
  font-size: 16px;
  transition: background 0.2s ease, color 0.2s ease;
}
.ps-topbar__home:hover,
.ps-topbar__action:hover { background: var(--ps-bg); color: var(--ps-ink); }

.ps-topbar__title {
  text-align: center;
}
.ps-topbar__eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ps-accent);
  font-weight: 600;
  margin-bottom: 1px;
}
.ps-topbar__title h1 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ps-ink);
}

/* ─── hero (압축형) ─────────────────────────────── */
.ps-hero {
  background: #fff;
  color: var(--ps-ink);
  padding: 18px 22px 16px;
  position: relative;
  text-align: center;
}
.ps-hero__inner { position: relative; max-width: 480px; margin: 0 auto; }
.ps-hero__title {
  font-size: clamp(18px, 5vw, 22px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--ps-ink);
}
.ps-hero__accent { color: var(--ps-accent); }

.ps-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 auto;
  max-width: 380px;
}
.ps-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  padding: 8px 6px;
  background: var(--ps-bg);
  border-radius: 10px;
}
.ps-hero__stat-num {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ps-ink);
}
.ps-hero__stat-label {
  font-size: 11px;
  color: var(--ps-ink-mute);
  font-weight: 500;
}

/* ─── controls (search + chips) ─────────────────── */
.ps-controls {
  position: sticky;
  top: calc(68px + var(--ps-safe-top));
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--ps-rule);
}
.ps-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
}
.ps-search__icon {
  width: 18px;
  color: var(--ps-ink-mute);
}
#ps-search {
  flex: 1;
  font-size: 16px; /* iOS zoom 방지 */
  color: var(--ps-ink);
  padding: 10px 0;
  min-height: 44px;
}
#ps-search::placeholder { color: var(--ps-ink-mute); }
.ps-search__clear {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ps-rule);
  color: var(--ps-ink-soft);
  border-radius: 50%;
  font-size: 12px;
}

.ps-chips {
  display: flex;
  gap: 8px;
  padding: 4px 18px 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ps-chips::-webkit-scrollbar { display: none; }
.ps-chip__icon { font-size: 11px; color: inherit; opacity: 0.7; }
.ps-chip.is-active .ps-chip__icon { opacity: 1; }
.ps-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ps-ink-soft);
  background: var(--ps-bg-elev);
  border: 1px solid var(--ps-rule);
  border-radius: 100px;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: all 0.15s ease;
}
.ps-chip__count {
  font-size: 11px;
  color: var(--ps-ink-mute);
  font-variant-numeric: tabular-nums;
}
.ps-chip:hover { border-color: var(--ps-ink-soft); }
.ps-chip.is-active {
  background: var(--ps-ink);
  color: #fff;
  border-color: var(--ps-ink);
}
.ps-chip.is-active .ps-chip__count { color: rgba(255,255,255,0.65); }

/* ─── meta row ───────────────────────────────────── */
.ps-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 6px;
  font-size: 12px;
  color: var(--ps-ink-mute);
}
.ps-meta__count {
  font-weight: 600;
  color: var(--ps-ink-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11.5px;
}
.ps-meta__divider { flex: 1; height: 1px; background: var(--ps-rule-soft); }
.ps-meta__hint {
  font-size: 11px;
  color: var(--ps-ink-mute);
  text-align: right;
  max-width: 62%;
  line-height: 1.45;
}

/* ─── list & cards ──────────────────────────────── */
.ps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 18px 32px;
}

.ps-card {
  background: var(--ps-bg-elev);
  border: 1px solid var(--ps-rule);
  border-radius: 14px;
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  cursor: pointer;
  box-shadow: var(--ps-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: psCardIn 0.4s ease both;
}
.ps-card:hover {
  border-color: var(--ps-rule);
  box-shadow: var(--ps-shadow-md);
}
.ps-card:active { transform: scale(0.997); }

@keyframes psCardIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ps-card__head {
  min-width: 0;
}
.ps-card__cat {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ps-ink-soft);
  font-weight: 500;
  margin: 0 0 7px;
  line-height: 1.4;
}
.ps-card__strategy {
  color: var(--ps-accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.ps-card__asset {
  color: var(--ps-ink-mute);
  font-size: 11px;
}

/* account pill ─ 일반/IRP/연금 */
.ps-card__acct {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  text-transform: none;
}
.ps-card__acct--irp {
  background: #FDEBD0;
  color: #8B4513;
}
.ps-card__acct--isa {
  background: #EDE7F6;
  color: #4527A0;
}
.ps-card__acct--pension {
  background: #E8F4E8;
  color: #2D5A2D;
}
.ps-card__acct--bwa {
  background: #E8EEF7;
  color: #1E3A5F;
}
.ps-card__name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ps-ink);
  margin: 0 0 3px;
  word-break: keep-all;
}
.ps-card__no {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ps-ink-mute);
}

.ps-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--ps-rule);
}
.ps-card__risk {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-card__risk-dots { display: inline-flex; gap: 4px; }
.ps-card__risk-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ps-rule);
}
.ps-card__risk-dot.is-on { background: var(--ps-accent); }
.ps-card__risk-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ps-ink-soft);
  font-weight: 600;
}

/* ─── card actions (복사 + 공유) ─────────────── */
.ps-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ps-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.ps-card__btn i { font-size: 12px; }
.ps-card__btn--copy {
  padding: 0 14px;
  background: var(--primary-blue-accent, #3B82F6);
  color: #fff;
}
.ps-card__btn--copy:hover { background: var(--primary-royal-blue, #1E3A5F); }
.ps-card__btn--copy:active { transform: translateY(1px); }
.ps-card__btn--share {
  width: 40px;
  background: transparent;
  color: var(--secondary-dark-gray, #374151);
  border: 1px solid var(--secondary-medium-gray, #E5E7EB);
}
.ps-card__btn--share:hover { color: var(--primary-deep-navy, #0A192F); border-color: var(--primary-deep-navy, #0A192F); }
.ps-card__btn--share:active { transform: translateY(1px); }

.ps-card.is-recent-share {
  border-color: var(--ps-accent);
  box-shadow: 0 0 0 1px var(--ps-accent-soft) inset;
}
.ps-card.is-recent-share .ps-card__name::after {
  content: '· 방금 공유함';
  font-size: 11px;
  font-weight: 500;
  color: var(--ps-accent);
  margin-left: 8px;
  letter-spacing: 0;
}

/* ─── empty state ─────────────────────────────── */
.ps-empty {
  text-align: center;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ps-empty__icon {
  font-size: 32px;
  color: var(--ps-ink-faint);
  margin-bottom: 4px;
}
.ps-empty__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--ps-ink);
}
.ps-empty__hint {
  font-size: 13.5px;
  color: var(--ps-ink-soft);
  margin: 0 0 14px;
}

/* ─── footnote ─────────────────────────────────── */
.ps-foot {
  margin-top: auto;
  padding: 24px 22px 28px;
  border-top: 1px solid var(--ps-rule-soft);
  text-align: center;
}
.ps-foot__logo {
  height: 22px;
  width: auto;
  opacity: 0.55;
  display: block;
  margin: 0 auto 12px;
}
.ps-foot__line {
  font-size: 12px;
  color: var(--ps-ink-mute);
  margin: 0 0 4px;
}
.ps-foot__line code {
  color: var(--ps-ink-2);
  font-weight: 500;
}
.ps-foot__sub {
  font-size: 11px;
  color: var(--ps-ink-faint);
  margin: 0;
}
.ps-foot__link {
  color: var(--ps-accent);
  text-decoration: none;
  margin-left: 12px;
  border-bottom: 1px solid currentColor;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.ps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.005em;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.ps-btn--block { width: 100%; }

.ps-btn--primary {
  background: var(--ps-ink);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 4px 16px rgba(10,25,47,0.18);
}
.ps-btn--primary:hover { background: var(--ps-ink-2); }
.ps-btn--primary:active { transform: translateY(1px); }

.ps-btn--ghost {
  background: var(--ps-bg-elev);
  color: var(--ps-ink);
  border: 1px solid var(--ps-rule);
  min-height: 44px;
  font-size: 14px;
  padding: 0 18px;
}
.ps-btn--ghost:hover { border-color: var(--ps-ink); }

/* ============================================================
   LOGIN GATE
   ============================================================ */
.ps-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--ps-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: max(28px, var(--ps-safe-top)) 24px max(28px, var(--ps-safe-bottom));
  overflow-y: auto;
  transition: opacity 0.3s ease;
}
.ps-gate[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.ps-gate::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(59,130,246,0.2), transparent 50%),
    radial-gradient(circle at 20% 100%, rgba(96,165,250,0.12), transparent 60%);
  pointer-events: none;
}

.ps-gate__frame {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ps-gate__brand {
  display: flex;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 8px;
}
.ps-gate__logo {
  height: 32px;
  width: auto;
  /* 다크 배경 위에서 화이트 컬러로 표시 */
  filter: brightness(0) invert(1);
}

.ps-gate__eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ps-accent);
  font-weight: 600;
  margin: 4px 0 8px;
}
.ps-gate__title {
  font-size: clamp(34px, 9vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 14px;
  color: #fff;
}
.ps-gate__lede {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
  margin: 0 0 8px;
}

.ps-gate__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.ps-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  transition: border-color 0.15s ease;
}
.ps-field:focus-within { border-color: var(--ps-accent); }
.ps-field__label {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}
.ps-field input {
  font-size: 17px;
  color: #fff;
  padding: 6px 0;
  letter-spacing: 0.01em;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 500;
  background: transparent;
}
.ps-field input::placeholder { color: rgba(255,255,255,0.4); }

.ps-gate__error {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #FCA5A5;
  margin: 0;
}

.ps-gate__hint {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  margin: 12px 0 0;
}

.ps-gate__back {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  padding: 12px;
}
.ps-gate__back:hover { color: var(--ps-accent); }

/* gate-only buttons override min-height already */
.ps-gate .ps-btn--primary {
  background: var(--ps-accent);
  box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}
.ps-gate .ps-btn--primary:hover { background: var(--ps-accent-2); }

/* ============================================================
   DETAIL SHEET
   ============================================================ */
.ps-sheet {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
}
.ps-sheet[aria-hidden="false"] { pointer-events: auto; }

.ps-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 47, 0);
  transition: background 0.3s ease;
}
.ps-sheet[aria-hidden="false"] .ps-sheet__backdrop {
  background: rgba(10, 25, 47, 0.5);
  backdrop-filter: blur(2px);
}

.ps-sheet__panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 92dvh;
  background: var(--ps-bg-elev);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(10,25,47,0.2);
}
.ps-sheet[aria-hidden="false"] .ps-sheet__panel { transform: translateY(0); }

.ps-sheet__handle {
  width: 40px; height: 4px;
  background: var(--ps-rule);
  border-radius: 2px;
  margin: 10px auto 4px;
  flex: 0 0 auto;
  cursor: pointer;
}
.ps-sheet__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ps-bg);
  color: var(--ps-ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.ps-sheet__close:hover { background: var(--ps-rule); color: var(--ps-ink); }

.ps-sheet__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 22px 16px;
  -webkit-overflow-scrolling: touch;
}
.ps-sheet__cta {
  padding: 14px 18px max(16px, var(--ps-safe-bottom));
  border-top: 1px solid var(--ps-rule);
  background: var(--ps-bg-elev);
}

/* detail content (injected) */
.ps-detail__cat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--ps-ink-soft);
  font-weight: 500;
  margin: 6px 0 10px;
  line-height: 1.4;
}
.ps-detail__cat-sep { color: var(--ps-ink-faint); }
.ps-detail__cat-text { color: var(--ps-ink-soft); }
.ps-detail__cat .ps-card__acct { font-size: 11px; padding: 3px 8px; }

.ps-detail__no {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ps-detail__no-code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--ps-ink-mute);
  letter-spacing: 0.02em;
}

.ps-detail__hint {
  font-size: 14px;
  color: var(--ps-ink);
  line-height: 1.6;
  margin: 0 0 8px;
  padding: 12px 14px;
  background: var(--ps-bg);
  border-left: 3px solid var(--ps-accent);
  border-radius: 4px;
}
.ps-detail__title {
  font-size: clamp(26px, 7vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ps-ink);
  word-break: keep-all;
}
.ps-detail__no {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--ps-ink-mute);
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.ps-detail__no .ps-copy {
  margin-left: 8px;
  color: var(--ps-accent);
  font-family: inherit;
  font-size: 11.5px;
  border: 1px solid var(--ps-rule);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.ps-detail__no .ps-copy:hover { background: var(--ps-accent-soft); }

/* perf data sample warning */
.ps-detail__section-title {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ps-ink-soft);
  font-weight: 700;
  margin: 24px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--ps-rule-soft);
}
.ps-detail__section-title:first-child { border: 0; padding-top: 0; margin-top: 0; }

.ps-detail__msg {
  background: var(--ps-bg);
  border: 1px solid var(--ps-rule);
  border-radius: 12px;
  padding: 14px 16px;
}
.ps-detail__msg-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ps-ink-mute);
  font-weight: 600;
  margin-bottom: 8px;
}
.ps-detail__msg-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ps-ink);
  white-space: pre-line;
  word-break: break-all;
}
.ps-detail__msg-url {
  color: var(--ps-accent);
  font-size: 12.5px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ─── 메시지/링크 복사 액션 ────────────────────────── */
.ps-detail__msg-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--ps-rule);
  flex-wrap: wrap;
}
.ps-msg-btn {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ps-ink-soft);
  background: var(--ps-bg-elev);
  border: 1px solid var(--ps-rule);
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ps-msg-btn:first-child {
  flex-basis: 100%;
  background: var(--ps-accent-soft);
  color: var(--ps-accent-2);
  border-color: var(--ps-accent-soft);
  font-weight: 700;
}
.ps-msg-btn:hover { border-color: var(--ps-ink-soft); color: var(--ps-ink); }
.ps-msg-btn:first-child:hover { background: var(--ps-accent); color: #fff; border-color: var(--ps-accent); }
.ps-msg-btn:active { transform: translateY(1px); }
.ps-msg-btn i { font-size: 12px; flex: 0 0 auto; }

.ps-msg-btn.is-copied {
  background: var(--ps-up);
  color: #fff;
  border-color: var(--ps-up);
}
.ps-msg-btn.is-copied i::before { content: '\f00c'; /* check */ }

/* ─── notice (발송 전 알아두세요) ────────────── */
.ps-detail__notice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  margin: 18px 0 8px;
  padding: 14px 16px 14px 14px;
  background: #FFF7E6;
  border: 1px solid #F2D592;
  border-left: 3px solid #D48A09;
  border-radius: 8px;
}
.ps-detail__notice-icon {
  color: #B86E04;
  font-size: 16px;
  margin-top: 2px;
}
.ps-detail__notice-body { min-width: 0; }
.ps-detail__notice-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #7A4905;
  margin-bottom: 6px;
}
.ps-detail__notice-text {
  font-size: 13px;
  line-height: 1.6;
  color: #5C3902;
  margin: 0 0 8px;
}
.ps-detail__notice-text b {
  color: #7A4905;
  font-weight: 700;
}
.ps-detail__notice-sub {
  font-size: 11.5px;
  line-height: 1.5;
  color: #8B6418;
  margin: 0;
  padding-top: 6px;
  border-top: 1px dashed rgba(122, 73, 5, 0.18);
}

/* ============================================================
   TOAST
   ============================================================ */
.ps-toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--ps-safe-bottom));
  transform: translate(-50%, 24px);
  opacity: 0;
  background: var(--ps-ink);
  color: #fff;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 100px;
  z-index: 2000;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 30px rgba(10,25,47,0.25);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}
.ps-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.ps-toast__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ps-accent);
  display: inline-block;
}

/* ============================================================
   responsive — desktop preview
   ============================================================ */
@media (min-width: 720px) {
  .ps-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .ps-app {
    max-width: 960px;
    margin: 0 auto;
  }
  .ps-hero__inner { max-width: 720px; }

  /* sheet → 데스크톱에서는 중앙 모달. 닫혀있을 땐 opacity·visibility로 명확히 숨김. */
  .ps-sheet__panel {
    left: 50%;
    top: 50%;
    bottom: auto;
    right: auto;
    width: 92%;
    max-width: 560px;
    max-height: 88dvh;
    border-radius: 16px;
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.22s ease,
      transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
      visibility 0s linear 0.22s;
  }
  .ps-sheet[aria-hidden="false"] .ps-sheet__panel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    transition-delay: 0s;
  }
}

@media (min-width: 1024px) {
  .ps-list { grid-template-columns: repeat(3, 1fr); }
}

/* small phones */
@media (max-width: 360px) {
    .ps-card__name { font-size: 17px; }
  .ps-hero { padding: 24px 18px 28px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ps-body *, .ps-body *::before, .ps-body *::after {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
  }
}

/* dark prefer — keep light theme (도구 페이지는 항상 light) */
@media (prefers-color-scheme: dark) {
  .ps-body { color-scheme: light; }
}
