/* =====================================================================
   tooly 프로 — 디자인 체계 한 장 (2026-09-27 P1-1)
   설계서: docs/plans/2026-09-27-p1-1-design-system.md
   붙는 곳: body.p-ui = 프로 부품을 쓰는 화면(관리 화면 + 손님이 연 무료 도구), body.p-body = 그중 왼쪽 메뉴 틀이 붙는 관리 화면
   규칙: 본문 16px · 보조 14px 바닥(12·13px 없음) · Pretendard 하나 · 강조색은 파랑 하나
         전폭 단추·전폭 검색창·이모지 아이콘 없음 · 카드는 테두리만, 떠 있는 것만 그림자
   ===================================================================== */

:root {
  --p-font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;

  /* 글자 사다리 — 위계는 크기보다 색과 굵기로 */
  --p-fs-num: 32px;
  --p-fs-title: 24px;
  --p-fs-section: 20px;
  --p-fs-card: 18px;
  --p-fs-body: 16px;
  --p-fs-meta: 14px;

  /* 색 — 랜딩 :root 와 design-system.css 에 이미 있는 값만 */
  --p-bg: #fafafa;
  --p-surface: #ffffff;
  --p-sunken: #f4f4f5;
  --p-line: #e4e4e7;
  --p-divider: #f4f4f5;
  --p-ink: #09090b;
  --p-ink-2: #52525b;
  --p-ink-off: #a1a1aa;          /* 비활성 표시 전용 — 흰 바탕 대비 2.6:1 이라 읽는 글자에는 쓰지 않는다 */
  --p-accent: #2563eb;
  --p-accent-hover: #1d4ed8;
  --p-accent-soft: #eff6ff;
  --p-accent-ink: #1d4ed8;
  --p-good: #047857;
  --p-good-dot: #10b981;
  --p-good-soft: #ecfdf5;
  --p-warn: #b45309;
  --p-warn-dot: #f59e0b;
  --p-warn-soft: #fffbeb;
  --p-bad: #be123c;
  --p-bad-dot: #f43f5e;
  --p-bad-soft: #fff1f2;
  --p-bad-line: #fecdd3;

  /* 모서리 · 그림자 */
  --p-r-ctl: 8px;
  --p-r-card: 12px;
  --p-r-float: 16px;
  --p-float: 0 12px 32px rgba(9, 9, 11, .12), 0 2px 8px rgba(9, 9, 11, .06);

  /* 틀 */
  --p-ctl-h: 40px;
  --p-side-w: 224px;
  --p-rail-w: 80px;
  --p-gap: 32px;
  --p-main-max: 1104px;
  --p-tab-h: 64px;

  /* 움직임 */
  --p-t: 150ms;
  --p-t-slide: 200ms;
  --p-ease: cubic-bezier(.4, 0, .2, 1);
}

@media (max-width: 767px) {
  :root { --p-ctl-h: 44px; }
}

/* ═════════════ 옛 Bootstrap(app.css 374KB) 없이 — 프로 화면이 기대던 바탕 규칙만(2026-09-28, 진단 «불러오는 무게») ═════════════
   프로 부품 화면은 app.css 를 안 부른다(layouts/main). 그 대신 Bootstrap 5.3 reboot 가운데 이 화면들이 실제로 기대던 줄만 옮겼다.
   :where() 로 감싸 무게(특이성)는 원래처럼 요소 하나 — 부품 규칙(.p-head h1 등)이 늘 이긴다. 옮긴 뒤 화면마다 요소 위치를 대조했다. */
body.p-ui { line-height: 1.5; -webkit-tap-highlight-color: transparent; }
:where(body.p-ui) a { color: var(--p-accent-ink); text-decoration: none; }   /* 예전 app.css 는 #73bcfb(흰 바탕 대비 2.2:1) — 파랑 하나로 */
:where(body.p-ui) :is(h1, h2, h3, h4, h5, h6) { margin-top: 0; margin-bottom: .5rem; line-height: 1.2; }
:where(body.p-ui) p { margin-top: 0; margin-bottom: 1rem; }
:where(body.p-ui) :is(ol, ul) { padding-left: 2rem; }
:where(body.p-ui) :is(ol, ul, dl) { margin-top: 0; margin-bottom: 1rem; }
:where(body.p-ui) :is(ol ol, ul ul, ol ul, ul ol) { margin-bottom: 0; }
:where(body.p-ui) :is(b, strong) { font-weight: bolder; }
:where(body.p-ui) small { font-size: .875em; }
:where(body.p-ui) :is(img, svg) { vertical-align: middle; }
:where(body.p-ui) table { caption-side: bottom; border-collapse: collapse; }
:where(body.p-ui) th { text-align: inherit; text-align: -webkit-match-parent; }
:where(body.p-ui) :is(thead, tbody, tfoot, tr, td, th) { border: 0 solid; border-color: inherit; }
:where(body.p-ui) label { display: inline-block; }
:where(body.p-ui) button { border-radius: 0; }
:where(body.p-ui) :is(input, button, select, optgroup, textarea) { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; }
:where(body.p-ui) :is(button, select) { text-transform: none; }
:where(body.p-ui) [role="button"] { cursor: pointer; }
:where(body.p-ui) :is(button, [type="button"], [type="reset"], [type="submit"]) { -webkit-appearance: button; }
:where(body.p-ui) :is(button, [type="button"], [type="reset"], [type="submit"]):not(:disabled) { cursor: pointer; }
:where(body.p-ui) textarea { resize: vertical; }
:where(body.p-ui) fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
:where(body.p-ui) legend { float: left; width: 100%; padding: 0; margin-bottom: .5rem; line-height: inherit; }
:where(body.p-ui) legend + * { clear: left; }
:where(body.p-ui) hr { margin: 1rem 0; color: inherit; border: 0; border-top: 1px solid; opacity: .25; }
:where(body.p-ui) :is(code, kbd, pre, samp) { font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 1em; }
:where(body.p-ui) code { font-size: .875em; word-wrap: break-word; }
:where(body.p-ui) summary { display: list-item; cursor: pointer; }
:where(body.p-ui) [hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* ── 바탕: 옛 app.css 의 «* { font-family: var(--font-family) }»(Rubik)를 변수째 Pretendard 로 ── */
body.p-ui {
  --font-family: var(--p-font);
  --bs-body-font-family: var(--p-font);
  --bs-font-sans-serif: var(--p-font);
  font-family: var(--p-font);
  font-size: var(--p-fs-body);
  color: var(--p-ink);
  -webkit-font-smoothing: antialiased;
}

/* 머리글과 본문 틀을 넓혀 왼쪽 메뉴 자리를 만든다 — 본문 기둥은 여전히 1104 */
body.p-body .ds-header-inner,
body.p-body .ds-content { max-width: 1440px; }

body.p-body .ds-content { padding-top: 32px; }

/* ═════════════ 틀: 왼쪽 메뉴 + 본문 ═════════════ */
.p-frame {
  display: grid;
  grid-template-columns: var(--p-side-w) minmax(0, 1fr);
  gap: var(--p-gap);
  align-items: start;
}

.p-main {
  min-width: 0;
  width: 100%;
  max-width: var(--p-main-max);
}

.p-side {
  position: sticky;
  top: calc(var(--header-h, 56px) + 24px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.p-side-label {
  padding: 16px 12px 6px;
  font-size: var(--p-fs-meta);
  font-weight: 600;
  color: var(--p-ink-2);
}

.p-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--p-ink-2);
  font-size: var(--p-fs-body);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--p-t) var(--p-ease), color var(--p-t) var(--p-ease);
}

.p-nav-item:hover { background: var(--p-sunken); color: var(--p-ink); }

.p-nav-item[aria-current="page"] {
  background: var(--p-accent-soft);
  color: var(--p-accent-ink);
  font-weight: 700;
}

.p-nav-item svg { flex: none; }
/* ìì§í¨ ì½ì§ ìì ì(2026-09-27) */
.p-nav-item { position: relative; }
.p-nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--p-accent); color: #fff; font-size: var(--p-fs-meta); font-weight: 700; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) and (max-width: 1199px) { .p-nav-badge { position: absolute; top: 6px; right: 10px; margin: 0; } }

.p-side-sep { height: 1px; margin: 10px 12px; background: var(--p-line); display: none; }

/* 768~1199: 글자를 아이콘 아래로 — 좁은 기둥(레일) */
@media (max-width: 1199px) {
  .p-frame { grid-template-columns: var(--p-rail-w) minmax(0, 1fr); gap: 24px; }
  .p-side-label { display: none; }
  .p-side-sep { display: block; }
  .p-nav-item {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    height: 64px;
    padding: 0 4px;
    font-size: var(--p-fs-meta);
    text-align: center;
    line-height: 1.2;
    word-break: keep-all;
  }
}

/* ═════════════ 폰: 아래 탭 ═════════════ */
.p-tabbar { display: none; }

@media (max-width: 767px) {
  .p-frame { display: block; }
  .p-side { display: none; }

  body.p-body .ds-content { padding-bottom: calc(var(--p-tab-h) + 32px + env(safe-area-inset-bottom)); }

  .p-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--p-tab-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    /* 절제된 유리 — 글이 적은 맨 위 층에만 */
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--p-line);
  }
}

.p-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--p-ink-2);
  font: 600 var(--p-fs-meta)/1.2 var(--p-font);
  text-decoration: none;
  cursor: pointer;
}

.p-tab[aria-current="page"],
.p-tab.is-active { color: var(--p-accent-ink); font-weight: 700; }

/* 폰 «도구» 판 — 아래에서 올라온다 */
.p-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(9, 9, 11, .4);
}

.p-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--p-surface);
  border-radius: 16px 16px 0 0;
  box-shadow: var(--p-float);
}

.p-sheet-handle { width: 40px; height: 4px; margin: 4px auto 12px; border-radius: 2px; background: var(--p-line); }

.p-sheet-title { margin: 0 4px 8px; font-size: var(--p-fs-card); font-weight: 700; }

.p-sheet a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--p-ink);
  font-size: var(--p-fs-body);
  font-weight: 600;
  text-decoration: none;
}

.p-sheet a:hover,
.p-sheet a[aria-current="page"] { background: var(--p-sunken); }

/* ═════════════ 페이지 머리 ═════════════ */
.p-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.p-head-text { flex: 1 1 320px; min-width: 0; }

.p-head h1 {
  margin: 0;
  font-size: var(--p-fs-title);
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.p-head p { margin: 4px 0 0; font-size: var(--p-fs-body); color: var(--p-ink-2); max-width: 720px; }

.p-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ═════════════ 단추 — 네 가지(주·보조·위험·글자) + 아이콘 ═════════════ */
.p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--p-ctl-h);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--p-r-ctl);
  font: 600 var(--p-fs-body)/1 var(--p-font);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--p-t) var(--p-ease), border-color var(--p-t) var(--p-ease), color var(--p-t) var(--p-ease);
}

.p-btn--primary { background: var(--p-accent); color: #fff; }
.p-btn--primary:hover { background: var(--p-accent-hover); color: #fff; }
.p-btn--secondary { background: var(--p-surface); border-color: var(--p-line); color: var(--p-ink); }
.p-btn--secondary:hover { background: var(--p-sunken); color: var(--p-ink); }
.p-btn--ghost { background: transparent; color: var(--p-ink-2); }
.p-btn--ghost:hover { background: var(--p-sunken); color: var(--p-ink); }
.p-btn--danger { background: var(--p-surface); border-color: var(--p-bad-line); color: var(--p-bad); }
.p-btn--danger:hover { background: var(--p-bad-soft); color: var(--p-bad); }
.p-btn--icon { width: var(--p-ctl-h); padding: 0; }
.p-btn:disabled,
.p-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.p-btn:focus-visible,
.p-nav-item:focus-visible,
.p-tab:focus-visible,
.p-sheet a:focus-visible,
.p-menu-list [role="menuitem"]:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }

/* 폼 아래 단추는 오른쪽에 붙인다 */
.p-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ═════════════ 입력칸 — 폭은 내용에 맞게, 칸 끝까지 늘리지 않는다 ═════════════ */
.p-field { display: grid; gap: 6px; margin-bottom: 16px; }
.p-label { font-size: var(--p-fs-meta); font-weight: 600; color: var(--p-ink-2); }
.p-hint { font-size: var(--p-fs-meta); color: var(--p-ink-2); }
.p-error { font-size: var(--p-fs-meta); color: var(--p-bad); }

.p-input,
.p-select,
.p-textarea {
  width: 100%;
  max-width: var(--p-w, 560px);
  height: var(--p-ctl-h);
  padding: 0 12px;
  border: 1px solid var(--p-line);
  border-radius: var(--p-r-ctl);
  background: var(--p-surface);
  color: var(--p-ink);
  font: 400 var(--p-fs-body)/1.4 var(--p-font);
  transition: border-color var(--p-t) var(--p-ease), box-shadow var(--p-t) var(--p-ease);
}

.p-textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.6; }

.p-input:focus,
.p-select:focus,
.p-textarea:focus { outline: none; border-color: var(--p-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }

.p-input[aria-invalid="true"] { border-color: var(--p-bad-dot); }

/* 페이지 편집기 블록 입력 폼 35종(resources/views/pro/bio/widgets/*_form) — 예전엔 불러오지 않는 Tailwind 이름표라 모양 없이 그려졌다 */
.p-bform { display: grid; gap: 16px; }
.p-bform .p-label { display: block; margin-bottom: 6px; }
.p-bform .p-hint { display: block; margin: 6px 0 0; }
.p-bform-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.p-bform-inline { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.p-bform-inline input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--p-accent); flex: none; }
.p-bform-checklabel { font-size: var(--p-fs-body); color: var(--p-ink); cursor: pointer; }
.p-bform-box { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--p-line); border-radius: var(--p-r-ctl); background: var(--p-bg); }
.p-bform-code { font-size: var(--p-fs-meta); word-break: break-all; }
.p-input-color { padding: 4px; cursor: pointer; }
@media (max-width: 480px) { .p-bform-2 { grid-template-columns: 1fr; } }

.p-w-url { --p-w: 560px; }
.p-w-name { --p-w: 320px; }
.p-w-phone { --p-w: 240px; }
.p-w-num { --p-w: 160px; }

/* ═════════════ 카드 · 격자 ═════════════ */
.p-card {
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-radius: var(--p-r-card);
  padding: 20px;
}

.p-card-title { margin: 0 0 12px; font-size: var(--p-fs-card); font-weight: 700; }

.p-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.p-num { font-size: var(--p-fs-num); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }

/* ═════════════ 표 — 열 제목 필수, 열 폭은 글자 수에 비례 ═════════════ */
.p-table-wrap {
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-radius: var(--p-r-card);
  overflow-x: auto;
}

.p-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--p-fs-body); }

.p-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--p-line);
  background: var(--p-bg);
  color: var(--p-ink-2);
  font-size: var(--p-fs-meta);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.p-table td { padding: 12px 16px; border-bottom: 1px solid var(--p-divider); vertical-align: middle; }
.p-table tr:last-child td { border-bottom: 0; }
.p-table tbody tr:hover { background: #fcfcfd; }
.p-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.p-table.is-compact td { padding-top: 8px; padding-bottom: 8px; }

/* ═════════════ 탭 · 버튼 묶음(세그먼트) ═════════════ */
.p-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--p-line);
  overflow-x: auto;
  overflow-y: hidden; /* 탭 밑줄(margin-bottom:-1px) 1px 때문에 세로 스크롤 막대가 서던 것 */
}

.p-tabs > a,
.p-tabs > button {
  display: inline-flex;
  align-items: center;
  height: 44px;
  margin-bottom: -1px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--p-ink-2);
  font: 600 var(--p-fs-body) var(--p-font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.p-tabs > [aria-selected="true"],
.p-tabs > [aria-current="page"] { color: var(--p-ink); border-bottom-color: var(--p-ink); }

.p-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--p-sunken); }

.p-seg > button {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--p-ink-2);
  font: 600 var(--p-fs-meta) var(--p-font);
  cursor: pointer;
}

.p-seg > [aria-pressed="true"] { background: var(--p-surface); color: var(--p-ink); box-shadow: 0 1px 2px rgba(9, 9, 11, .08); }

@media (max-width: 767px) {
  .p-seg > button { height: 44px; }
}

/* ═════════════ 딱지 ═════════════ */
.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--p-sunken);
  color: var(--p-ink-2);
  font-size: var(--p-fs-meta);
  font-weight: 600;
  white-space: nowrap;
}

.p-badge--good { background: var(--p-good-soft); color: var(--p-good); }
.p-badge--warn { background: var(--p-warn-soft); color: var(--p-warn); }
.p-badge--bad { background: var(--p-bad-soft); color: var(--p-bad); }
.p-badge--accent { background: var(--p-accent-soft); color: var(--p-accent-ink); }

/* ═════════════ ⋯ 메뉴 — 지우기 같은 위험한 일은 여기 안으로 ═════════════ */
.p-menu { position: relative; display: inline-block; }

.p-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 184px;
  padding: 6px;
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-radius: 12px;
  box-shadow: var(--p-float);
}

.p-menu-list [role="menuitem"] {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--p-ink);
  font: 500 var(--p-fs-body) var(--p-font);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.p-menu-list [role="menuitem"]:hover { background: var(--p-sunken); }
.p-menu-list .is-danger { color: var(--p-bad); }
.p-menu-list .is-danger:hover { background: var(--p-bad-soft); }
.p-menu-sep { height: 1px; margin: 6px 0; background: var(--p-line); }

/* ═════════════ 알림(토스트) — 아래 가운데, 되돌리기 단추를 품는다 ═════════════ */
.p-toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 70;
  display: grid;
  gap: 8px;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 767px) {
  .p-toasts { bottom: calc(var(--p-tab-h) + 16px + env(safe-area-inset-bottom)); }
}

.p-toast {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 8px 8px 8px 16px;
  border-radius: 12px;
  background: #18181b;
  color: #fafafa;
  box-shadow: var(--p-float);
  font-size: var(--p-fs-body);
  pointer-events: auto;
}

.p-toast.is-error { background: #881337; }

.p-toast button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  color: #bfdbfe;
  font: 700 var(--p-fs-meta) var(--p-font);
  cursor: pointer;
}

/* ═════════════ 옆 서랍 · 가운데 창 — 바깥을 눌러도 닫히지 않는다(작성 중 내용 보호) ═════════════ */
.p-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(9, 9, 11, .4);
  opacity: 0;
  transition: opacity var(--p-t-slide) var(--p-ease);
}

.p-overlay.is-open { opacity: 1; }

.p-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 66;
  display: flex;
  flex-direction: column;
  width: min(480px, 100vw);
  background: var(--p-surface);
  box-shadow: var(--p-float);
  transform: translateX(100%);
  transition: transform var(--p-t-slide) var(--p-ease);
}

.p-drawer.is-open { transform: none; }

.p-drawer-head,
.p-modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--p-line); }

.p-drawer-head h2,
.p-modal-head h2 { flex: 1; margin: 0; font-size: var(--p-fs-section); font-weight: 700; }

.p-drawer-body { flex: 1; overflow-y: auto; padding: 20px; }

.p-drawer-foot,
.p-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--p-line); }

.p-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 66;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--p-surface);
  border-radius: var(--p-r-float);
  box-shadow: var(--p-float);
  opacity: 0;
  transform: translate(-50%, -48%);
  transition: opacity var(--p-t) var(--p-ease), transform var(--p-t) var(--p-ease);
}

.p-modal.is-open { opacity: 1; transform: translate(-50%, -50%); }
.p-modal-body { padding: 20px; }

/* ═════════════ 빈 상태 — 다음 할 일 하나 ═════════════ */
.p-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 48px 24px;
  text-align: center;
  background: var(--p-surface);
  border: 1px dashed var(--p-line);
  border-radius: var(--p-r-card);
}

.p-empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--p-accent-soft);
  color: var(--p-accent);
}

.p-empty h2 { margin: 0; font-size: var(--p-fs-card); font-weight: 700; }
.p-empty p { max-width: 420px; margin: 0 0 8px; color: var(--p-ink-2); }

/* ═════════════ 뼈대 로딩 — 움직이지 않는 회색 칸(깜빡임 금지) ═════════════ */
.p-skel { display: block; border-radius: 6px; background: var(--p-sunken); }
.p-skel--line { height: 16px; }
.p-skel--title { height: 24px; width: 40%; }

/* ═════════════ 저장 표시 ═════════════ */
.p-save { display: inline-flex; align-items: center; gap: 8px; font-size: var(--p-fs-meta); color: var(--p-ink-2); }
.p-save::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--p-ink-off); }
.p-save[data-state="saving"]::before { background: var(--p-warn-dot); }
.p-save[data-state="saved"]::before { background: var(--p-good-dot); }
.p-save[data-state="error"] { color: var(--p-bad); }
.p-save[data-state="error"]::before { background: var(--p-bad-dot); }

/* ═════════════ 목록 도구줄 — 찾기칸(폭 320, 칸 끝까지 늘리지 않는다) + 거르기 칩 ═════════════ */
.p-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; }

.p-search { position: relative; flex: 0 1 320px; }
.p-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--p-ink-2); pointer-events: none; }
.p-search .p-input { padding-left: 40px; max-width: 320px; }

.p-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.p-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  background: var(--p-surface);
  color: var(--p-ink-2);
  font: 600 var(--p-fs-meta) var(--p-font);
  text-decoration: none;
  cursor: pointer;
}

.p-chip:hover { border-color: var(--p-ink-off); color: var(--p-ink); }
.p-chip[aria-current="page"], .p-chip[aria-pressed="true"] { background: var(--p-accent-soft); border-color: #bfdbfe; color: var(--p-accent-ink); }
.p-chip-n { font-variant-numeric: tabular-nums; }

@media (max-width: 767px) {
  .p-chip { height: 44px; flex: none; }
  .p-search { flex-basis: 100%; }
  /* 폰 목록 화면 — 목록이 첫 화면에 더 보이게(2026-09-28, 진단 «휴대폰 링크: 제목과 설명이 첫 화면의 40%»).
     거르기·태그 칩은 여러 줄로 쌓지 않고 한 줄로 옆으로 민다(화면 끝까지 닿게) */
  .p-toolbar > .p-chips, .p-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .p-toolbar > .p-chips::-webkit-scrollbar, .p-chips--scroll::-webkit-scrollbar { display: none; }
  /* 단추 하나짜리 머리(새 링크·새 QR·새 페이지)는 제목 옆에 단추, 설명은 아래 */
  .p-head:has(> .p-head-actions > .p-btn:only-child) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin-bottom: 16px; }
  .p-head:has(> .p-head-actions > .p-btn:only-child) > .p-head-text { display: contents; }
  .p-head:has(> .p-head-actions > .p-btn:only-child) h1 { grid-column: 1; grid-row: 1; margin: 0; }
  .p-head:has(> .p-head-actions > .p-btn:only-child) > .p-head-actions { grid-column: 2; grid-row: 1; }
  .p-head:has(> .p-head-actions > .p-btn:only-child) > .p-head-text > :not(h1) { grid-column: 1 / -1; }
}

/* ═════════════ 알림 상자(오류) ═════════════ */
.p-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin-bottom: 16px; border-radius: 12px; background: var(--p-bad-soft); color: var(--p-bad); font-size: var(--p-fs-body); max-width: 720px; }
.p-alert ul { margin: 0; padding-left: 18px; }

/* ═════════════ 표 줄 전체가 눌리는 목록 ═════════════ */
.p-row { cursor: pointer; }
.p-row-name { display: grid; gap: 2px; min-width: 0; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.p-row-name strong { overflow: hidden; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.p-row-name span { overflow: hidden; color: var(--p-ink-2); font-size: var(--p-fs-meta); white-space: nowrap; text-overflow: ellipsis; }
.p-row-name:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; border-radius: 4px; }
.p-row .p-badge + .p-badge { margin-left: 4px; }

/* 7일 막대 — 한 줄 안의 작은 그림 */
.p-spark { display: inline-flex; align-items: flex-end; gap: 3px; height: 24px; margin-right: 8px; vertical-align: middle; }
.p-spark i { display: block; width: 6px; min-height: 2px; border-radius: 2px; background: #bfdbfe; }
.p-spark i:last-child { background: var(--p-accent); }

/* 서랍 안 7일 막대 — 날짜 글자 14px */
.p-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 120px; margin: 8px 0 4px; }
.p-bars > div { display: grid; grid-template-rows: 1fr auto; gap: 4px; height: 100%; text-align: center; }
.p-bars b { align-self: end; display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: #93c5fd; }
.p-bars > div:last-child b { background: var(--p-accent); }
.p-bars span { font-size: var(--p-fs-meta); color: var(--p-ink-2); font-variant-numeric: tabular-nums; }

/* 서랍 안 묶음 */
.p-section { padding: 16px 0; border-top: 1px solid var(--p-divider); }
.p-section:first-child { padding-top: 0; border-top: 0; }
.p-section-title { margin: 0 0 10px; font-size: var(--p-fs-body); font-weight: 700; }
.p-stats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 8px; }
.p-stats div { display: grid; }
.p-stats b { font-size: var(--p-fs-section); font-weight: 800; font-variant-numeric: tabular-nums; }
.p-stats span { font-size: var(--p-fs-meta); color: var(--p-ink-2); }
.p-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.p-copy code { padding: 8px 12px; border-radius: var(--p-r-ctl); background: var(--p-sunken); color: var(--p-ink); font: 600 var(--p-fs-body) var(--p-font); word-break: break-all; }
.p-qr-box { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.p-qr-box .p-qr { width: 176px; height: 176px; padding: 8px; border: 1px solid var(--p-line); border-radius: 12px; background: #fff; }
.p-qr-box .p-qr svg, .p-qr-box .p-qr canvas { display: block; }
.p-list-plain { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.p-list-plain li { display: flex; gap: 8px; font-size: var(--p-fs-body); }
.p-list-plain li b { font-variant-numeric: tabular-nums; }
.p-check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p-check-chips label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--p-line); border-radius: 999px; font-size: var(--p-fs-meta); font-weight: 600; cursor: pointer; }
.p-check-chips input { width: 16px; height: 16px; accent-color: var(--p-accent); }
.p-inline-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.p-inline-fields .p-field { margin-bottom: 0; }
.p-prefix { display: flex; align-items: center; max-width: 440px; }
.p-prefix span { flex: none; height: var(--p-ctl-h); display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--p-line); border-right: 0; border-radius: var(--p-r-ctl) 0 0 var(--p-r-ctl); background: var(--p-sunken); color: var(--p-ink-2); font-size: var(--p-fs-meta); }
.p-prefix .p-input { border-radius: 0 var(--p-r-ctl) var(--p-r-ctl) 0; }
.p-more { margin-top: 8px; border-top: 1px solid var(--p-divider); padding-top: 12px; }
.p-more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--p-accent-ink); font-weight: 600; cursor: pointer; list-style: none; }
.p-more > summary::-webkit-details-marker { display: none; }
.p-more[open] > summary { margin-bottom: 8px; }

/* 링크 표 — 폰에서는 이름·클릭만 남긴다 */
@media (max-width: 767px) {
  .p-links-table col.c-week, .p-links-table col.c-state, .p-links-table col.c-date,
  .p-links-table th.c-week, .p-links-table th.c-state, .p-links-table th.c-date,
  .p-links-table td.c-week, .p-links-table td.c-state, .p-links-table td.c-date { display: none; }
  .p-links-table td { padding-top: 14px; padding-bottom: 14px; }
  .p-links-table .p-table { table-layout: auto; }
}

/* 페이지 목록(2026-09-28) — 링크 표와 같은 틀. ⋯ 메뉴가 표 아래로 펼쳐지므로 잘리지 않게 넘침을 연다(칸이 폭에 맞아 가로 넘침 없음) */
.p-pages-table { overflow: visible; }
.p-row-acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.p-row-acts form { margin: 0; }
.p-row-name strong .p-badge { margin-left: 6px; vertical-align: 1px; }
.p-menu-list form { margin: 0; }
.p-only-phone { display: none; }
@media (max-width: 767px) {
  .p-pages-table col.c-week, .p-pages-table col.c-state,
  .p-pages-table th.c-week, .p-pages-table th.c-state,
  .p-pages-table td.c-week, .p-pages-table td.c-state { display: none; }
  .p-pages-table .p-table { table-layout: auto; }
  .p-pages-table td { padding-top: 14px; padding-bottom: 14px; }
  .p-hide-phone { display: none !important; }
  .p-only-phone { display: block; }
}

.p-only-phone-i { display: none; }
/* 폰 머리글(프로 관리 화면) — 누르는 자리 44px. 블로그·문의는 아래 탭·맨 아래 줄이 맡고, 그 자리를 찾기 칸에 준다(2026-09-28) */
@media (max-width: 767px) {
  body.p-body .ds-header-nav .ds-header-link { display: none; }
  /* 테두리를 안쪽 그림자로 — 테두리 두께만큼 입력칸이 41px 로 줄지 않게, 칸 전체가 44px */
  body.p-body .ds-search { height: 44px; margin-right: 8px; border: 0; box-shadow: inset 0 0 0 1.5px var(--border); }
  body.p-body .ds-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--text-primary); }
  body.p-body .ds-logo { min-height: 44px; display: inline-flex; align-items: center; }
  body.p-body .ds-header [aria-label="계정 메뉴"] { width: 44px !important; height: 44px !important; }
  .p-only-phone-i { display: inline-flex; }
}

/* 만들기 서랍의 «무엇을 만들까요» — 둘 중 하나 */
.p-kind { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.p-kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.p-kind-opt { position: relative; display: flex; gap: 10px; align-items: center; min-height: 64px; padding: 10px 12px; border: 1px solid var(--p-line); border-radius: var(--p-r-card); cursor: pointer; }
.p-kind-opt.is-on { border-color: var(--p-accent); background: var(--p-accent-soft); }
.p-kind-opt:focus-within { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.p-kind-opt input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.p-kind-opt b { display: block; font-size: var(--p-fs-body); }
/* 서식 작은 그림 — 테마 바탕 위에 단추 셋 */
.p-kind-pic { flex: none; display: grid; align-content: center; gap: 4px; width: 40px; height: 48px; padding: 0 7px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(9, 9, 11, .08); }
.p-kind-pic i { display: block; height: 6px; border-radius: 3px; }
.p-kind-pic.is-blank, .p-kind-pic.is-card { place-items: center; background: var(--p-sunken); color: var(--p-ink-2); }

/* ═════════════ QR(P1-5) — 카드 격자 · 견본 색 ═════════════ */
.p-qr-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.p-qr-card { display: grid; justify-items: center; gap: 6px; padding: 20px 16px 16px; text-align: center; cursor: pointer; font: inherit; color: inherit; transition: border-color var(--p-t) var(--p-ease); }
.p-qr-card:hover { border-color: var(--p-ink-off); }
.p-qr-card:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.p-qr-card strong { max-width: 100%; overflow: hidden; font-size: var(--p-fs-body); white-space: nowrap; text-overflow: ellipsis; }
.p-qr-card .p-hint { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.p-qr-thumb { display: grid; place-items: center; width: 160px; height: 160px; margin-bottom: 6px; padding: 8px; border-radius: 10px; background: #fff; }
.p-qr-thumb svg { display: block; }
.p-qr-meta { font-size: var(--p-fs-meta); color: var(--p-ink-2); }
.p-qr-meta b { color: var(--p-ink); font-variant-numeric: tabular-nums; }
.p-qr-box .p-qr--lg { width: 240px; height: 240px; }

.p-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.p-swatch { width: 32px; height: 32px; padding: 0; border: 1px solid var(--p-line); border-radius: 50%; cursor: pointer; }
.p-swatch[aria-pressed="true"] { outline: 2px solid var(--p-accent); outline-offset: 2px; }
@media (max-width: 767px) { .p-swatch { width: 40px; height: 40px; } }

/* ═════════════ 번역기(P1-7) — 원문 | 번역, 폰은 원문 → 단추 → 번역 ═════════════ */
.p-translate { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "src dst" "act act"; }
.p-tr-src { grid-area: src; display: grid; gap: 12px; align-content: start; }
.p-tr-dst { grid-area: dst; display: grid; gap: 12px; align-content: start; background: #fcfcfd; }
.p-tr-act { grid-area: act; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.p-tr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.p-tr-area { max-width: none; min-height: 260px; font-size: 17px; line-height: 1.7; resize: vertical; }
.p-tr-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.p-tr-out { min-height: 260px; }
.p-tr-text { font-size: 17px; line-height: 1.7; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.p-tr-empty { display: grid; align-content: center; justify-items: start; min-height: 200px; }
@media (max-width: 899px) {
  .p-translate { grid-template-columns: minmax(0, 1fr); grid-template-areas: "src" "act" "dst"; }
  .p-tr-area, .p-tr-out { min-height: 180px; }
}

/* ═════════════ 프로 홈(P1-4) ═════════════ */
.p-create { margin-bottom: 16px; }
.p-create-row { display: flex; flex-wrap: wrap; gap: 8px; }
.p-create-row .p-input { flex: 1 1 320px; max-width: 640px; }

.p-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.p-kpi { display: grid; gap: 6px; align-content: start; }
.p-kpi-label { font-size: var(--p-fs-meta); font-weight: 600; color: var(--p-ink-2); }
.p-kpi-delta { font-size: var(--p-fs-meta); font-weight: 600; color: var(--p-ink-2); }
.p-kpi-delta.is-up { color: var(--p-good); }

.p-home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; grid-auto-flow: dense; }
.p-home-main { grid-column: 1; }
.p-home-side { grid-column: 2; }

.p-tip { background: var(--p-accent-soft); border-color: #bfdbfe; }
.p-tip-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--p-accent-ink); font-size: var(--p-fs-meta); font-weight: 700; }
.p-tip-text { margin: 8px 0 6px; font-size: var(--p-fs-card); font-weight: 600; line-height: 1.5; }

.p-todo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--p-divider); }
.p-card-title + .p-todo { border-top: 0; padding-top: 0; }
.p-todo a { font-weight: 700; color: var(--p-accent-ink); text-decoration: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
/* 그 자리에서 하는 일(2026-09-27) — 글자는 그 화면으로 가는 링크, 오른쪽은 실행 단추 */
.p-todo a.p-todo-link { min-height: 0; display: block; white-space: normal; font-weight: 400; color: var(--p-ink); }
.p-todo a.p-todo-link:hover { text-decoration: underline; }
/* 챙길 일의 그 자리 단추 = 보조 단추(p-btn--secondary) 그대로 — 예전엔 파란 14px 굵은 글자의 다섯째 단추 모양이었다(2026-09-28, 진단 «단추 네 가지») */
.p-todo-act { white-space: nowrap; }
.p-todo-act:disabled { opacity: .5; cursor: default; }
.p-todo[hidden] { display: none; }
.p-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p-ink-off); }
.p-dot.is-warn { background: var(--p-warn-dot); }
.p-dot.is-bad { background: var(--p-bad-dot); }
.p-dot.is-accent { background: var(--p-accent); }

/* 이번 주 요약(P1-9) — 계산으로 만든 문장 두세 줄, 문장마다 근거 숫자 */
.p-digest-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.p-digest-list li { display: flex; gap: 10px; align-items: flex-start; }
.p-digest-ico { display: inline-flex; margin-top: 3px; color: var(--p-accent-ink); }
.p-digest-text { margin: 0 0 2px; font-size: var(--p-fs-body); font-weight: 600; line-height: 1.55; }
.p-digest-list .p-hint { margin: 0; }
.p-digest-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--p-divider); }

.p-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.p-steps li { display: flex; gap: 10px; align-items: flex-start; }
.p-step-mark { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--p-line); font-size: var(--p-fs-meta); font-weight: 700; color: var(--p-ink-2); }
.p-steps li.is-done .p-step-mark { background: var(--p-good-soft); border-color: #a7f3d0; color: var(--p-good); }
.p-steps li.is-done s { color: var(--p-ink-2); }
.p-steps a { font-weight: 700; color: var(--p-accent-ink); text-decoration: none; }

@media (max-width: 1023px) {
  .p-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-home-grid { grid-template-columns: minmax(0, 1fr); }
  .p-home-main, .p-home-side { grid-column: 1; }
}

/* ═════════════ 검색에서 고른 항목 — 주소 끝 #link-12 로 와서 테두리로 찾게 한다 ═════════════ */
.p-target { scroll-margin-top: calc(var(--header-h, 56px) + 24px); }
.p-target:target { outline: 2px solid var(--p-accent); outline-offset: 2px; }

/* ═════════════ 움직임을 줄여 달라는 사람에게는 끈다 ═════════════ */
@media (prefers-reduced-motion: reduce) {
  .p-nav-item, .p-btn, .p-input, .p-select, .p-textarea,
  .p-overlay, .p-drawer, .p-modal { transition: none !important; }
}

/* 화면 사이 부드러운 전환(2026-09-27, UX 진단 «브라우저가 해 주는 전환») — 자바스크립트 없이 브라우저 기능(View Transitions)으로,
   왼쪽 메뉴는 제자리에 두고 본문만 150ms 로 바꾼다. 못 쓰는 브라우저는 그냥 넘어가고, «동작 줄이기»면 끈다 */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .p-side { view-transition-name: p-side; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 150ms; }
}

/* ═════════════ 옛 화면 다리 ═════════════
   P1-3~6 에서 화면을 새 부품으로 다시 지을 때마다 해당 줄을 지운다.
   tool-premium.css 가 입력칸을 13px·Inter 로 !important 고정해 두어 같은 무게로 되돌린다. */
body.p-ui .custom-input,
body.p-ui .custom-textarea,
body.p-ui .form-control,
body.p-ui .form-select,
body.p-ui input[type="text"],
body.p-ui input[type="url"],
body.p-ui input[type="password"],
body.p-ui input[type="email"],
body.p-ui input[type="search"],
body.p-ui input[type="number"],
body.p-ui input[type="tel"],
body.p-ui textarea,
body.p-ui select {
  font-size: 16px !important;
  font-family: var(--p-font) !important;
}

body.p-ui small,
body.p-ui .small { font-size: 14px; }

body.p-ui .custom-label { font-size: 14px; }

/* ═════════════ 무료 도구 여섯(2026-09-27 P1-8, 결정 5) ═════════════
   손님이 여는 화면은 보통 사이트 틀 안(.p-free, 광고 있음), 로그인하면 관리 화면 틀(.p-main).
   QR 스튜디오 · 링크 미리보기 · UTM 만들기 · 이메일 서명 · 딥링크 · 번역기 */
.p-free { max-width: var(--p-main-max); margin: 0 auto; padding-top: 8px; }

/* 주소 한 칸 + 단추 — 칸은 내용 폭까지만, 단추는 글자 폭 */
.p-lp-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.p-lp-form .p-input { flex: 1 1 320px; }

/* 폰·태블릿 떠 있는 단추 줄 — 결과가 입력 아래로 내려가는 화면(UTM·서명·스튜디오)에서 핵심 단추를 늘 보이게.
   편집기 .bio-mobile-bar 와 같은 모양. 로그인한 폰에서는 아래 탭 위로 */
.p-float-bar { display: none; }
@media (max-width: 1023px) {
  .p-float-bar {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 44;
    max-width: calc(100vw - 32px);
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(9, 9, 11, .12);
    transform: translateX(-50%);
    white-space: nowrap;
  }
  .p-float-bar .d-none, .p-float-bar [x-cloak] { display: none !important; }
  .has-float-bar { padding-bottom: 88px; }
}
@media (max-width: 767px) {
  body.p-body .p-float-bar { bottom: calc(var(--p-tab-h) + 12px + env(safe-area-inset-bottom)); }
}

/* 계정으로 잇는 문 · 발치의 다른 도구 */
.p-free-cta { display: grid; gap: 6px; justify-items: start; max-width: 720px; margin: 0 0 24px; }
.p-free-cta strong { font-size: var(--p-fs-body); }
.p-free-cta p { margin: 0 0 6px; font-size: var(--p-fs-meta); color: var(--p-ink-2); line-height: 1.6; }
.p-free-foot { margin: 40px 0 8px; padding-top: 20px; border-top: 1px solid var(--p-line); }
.p-free-foot h2 { margin: 0 0 10px; font-size: var(--p-fs-body); font-weight: 700; }
.p-free-foot-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.p-free-foot .p-hint a { color: var(--p-accent-ink); font-weight: 600; }

/* ── 링크 미리보기 점검기 ── */
.p-lp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 16px 0 20px; font-size: var(--p-fs-meta); color: var(--p-ink-2); }
.p-lp-meta a { color: var(--p-accent-ink); word-break: break-all; }
.p-lp-h2 { margin: 0 0 4px; font-size: var(--p-fs-section); font-weight: 700; }
.p-lp-note { display: block; margin: 0 0 12px; }
.p-lp-layout { display: grid; gap: 24px 32px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; margin-bottom: 32px; }
.p-lp-grid { display: grid; gap: 20px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1023px) { .p-lp-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639px) { .p-lp-grid { grid-template-columns: minmax(0, 1fr); } }

.lp-card { margin: 0; display: grid; gap: 8px; align-content: start; }
.lp-app { font-size: var(--p-fs-meta); font-weight: 700; color: var(--p-ink-2); }
.lp-app-note { font-weight: 400; }
.lp-text { display: grid; gap: 2px; padding: 10px 12px; font-size: var(--p-fs-meta); line-height: 1.45; color: var(--p-ink); }
.lp-text strong { font-size: var(--p-fs-body); font-weight: 700; }
.lp-muted { color: var(--p-ink-2); }
.lp-upper { text-transform: uppercase; letter-spacing: .02em; }
.lp-clamp1, .lp-clamp2, .lp-clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.lp-clamp1 { -webkit-line-clamp: 1; }
.lp-clamp2 { -webkit-line-clamp: 2; }
.lp-clamp3 { -webkit-line-clamp: 3; }

.lp-media { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--p-sunken); }
.lp-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-media-empty { display: none; padding: 8px; font-size: var(--p-fs-meta); color: var(--p-ink-2); text-align: center; }
.lp-media.is-empty .lp-media-empty,
.lp-media.is-broken .lp-media-empty { display: block; }
.lp-media.is-broken img { display: none; }
.lp-media--wide, .lp-media--fb { aspect-ratio: 1.91 / 1; }
.lp-media--x { aspect-ratio: 2 / 1; border-radius: 16px; border: 1px solid var(--p-line); }
.lp-media--square { flex: 0 0 96px; width: 96px; height: 96px; }
.lp-media--slack { aspect-ratio: 1.91 / 1; max-width: 320px; margin-top: 6px; border-radius: 8px; }

.lp-kakao { padding: 14px; border-radius: 12px; background: #bacee0; }
.lp-kakao-bubble { max-width: 260px; overflow: hidden; border-radius: 10px; background: #fff; }
.lp-fb { overflow: hidden; border: 1px solid var(--p-line); border-radius: 8px; background: #fff; }
.lp-fb-text { background: #f0f2f5; }
.lp-x { display: grid; gap: 4px; }
.lp-x-host { position: absolute; left: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: var(--p-fs-meta); }
.lp-x-from { font-size: var(--p-fs-meta); }
.lp-x--small { display: flex; overflow: hidden; border: 1px solid var(--p-line); border-radius: 16px; background: #fff; }
.lp-x--small .lp-text { align-content: center; min-width: 0; }
.lp-slack { display: grid; gap: 2px; padding: 2px 0 2px 12px; border-left: 4px solid #dddddd; font-size: var(--p-fs-meta); line-height: 1.5; color: var(--p-ink); }
.lp-slack-site { font-weight: 700; }
.lp-slack-title { color: #1264a3; font-size: var(--p-fs-body); font-weight: 700; }

.p-lp-sum { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 12px; font-size: var(--p-fs-meta); font-weight: 600; }
.p-lp-sum-item { display: inline-flex; align-items: center; gap: 6px; }
.p-lp-list { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.p-lp-list li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--p-line); border-radius: var(--p-r-card); background: var(--p-surface); }
.p-lp-list strong { font-size: var(--p-fs-body); font-weight: 600; }
.p-lp-list p { margin: 2px 0 0; font-size: var(--p-fs-meta); line-height: 1.6; color: var(--p-ink-2); }
.p-lp-ico { display: inline-flex; margin-top: 2px; }
.lp-lv-bad .p-lp-ico, .p-lp-sum-item.lp-lv-bad { color: var(--p-bad); }
.lp-lv-warn .p-lp-ico, .p-lp-sum-item.lp-lv-warn { color: var(--p-warn); }
.lp-lv-ok .p-lp-ico, .p-lp-sum-item.lp-lv-ok { color: var(--p-good); }
.lp-lv-info .p-lp-ico { color: var(--p-ink-2); }
.p-lp-cache h3 { margin: 0 0 6px; font-size: var(--p-fs-body); font-weight: 700; }
.p-lp-cache p { margin: 0 0 8px; font-size: var(--p-fs-meta); line-height: 1.6; color: var(--p-ink-2); }
.p-lp-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.p-lp-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--p-accent-ink); font-size: var(--p-fs-meta); font-weight: 600; }
.p-lp-tags { margin-bottom: 24px; }
.p-lp-tags .p-lp-h2 { margin-bottom: 12px; }
.p-lp-tags code { padding: 0; background: none; color: var(--p-ink); font-size: var(--p-fs-meta); }
.p-lp-val { font-size: var(--p-fs-meta); word-break: break-all; }
.lp-none { color: var(--p-ink-2); }

/* ── UTM 만들기 · 이메일 서명 — 왼쪽 입력, 오른쪽 결과(넓은 화면에서 따라 내려온다) ── */
.p-utm, .p-sig { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; margin-bottom: 8px; }
.p-utm-out, .p-sig-out { position: sticky; top: calc(var(--header-h, 56px) + 16px); }
@media (max-width: 1023px) {
  .p-utm, .p-sig { grid-template-columns: minmax(0, 1fr); }
  .p-utm-out, .p-sig-out { position: static; }
}
.p-utm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p-utm-pair { display: flex; flex-wrap: wrap; gap: 0 16px; }
.p-utm-pair .p-field { flex: 1 1 200px; }
.p-label code { padding: 0; background: none; color: var(--p-ink-2); font-size: var(--p-fs-meta); font-weight: 400; }
.p-utm-code { display: block; padding: 12px 14px; border-radius: var(--p-r-ctl); background: var(--p-sunken); color: var(--p-ink); font: 500 var(--p-fs-meta)/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.p-utm-warn { margin: 8px 0 0; font-size: var(--p-fs-meta); color: var(--p-warn); }
.p-utm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.p-utm-saved { margin-top: 16px; }
.p-utm-saved-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.p-utm-saved-list li { display: inline-flex; align-items: center; gap: 2px; }

.p-sig-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.p-sig-swatch { width: 36px; height: 36px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--p-line); cursor: pointer; }
.p-sig-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--p-ink); }
@media (max-width: 767px) { .p-sig-swatch { width: 44px; height: 44px; } }
.p-sig-reset { justify-content: flex-start; margin-top: 4px; }
.p-sig-paper { min-height: 140px; margin-top: 8px; padding: 24px; overflow-x: auto; border: 1px solid var(--p-line); border-radius: var(--p-r-card); background: #fff; }
.p-sig-guide { margin-top: 16px; }
.p-sig-steps { margin: 12px 0 0; padding-left: 20px; font-size: var(--p-fs-meta); line-height: 1.7; color: var(--p-ink); }
.p-sig-steps li + li { margin-top: 4px; }
.p-sig-out .p-free-cta { margin: 16px 0 0; }

/* ── 딥링크 변환기 ── */
.p-dl-apps { max-width: 720px; margin: 0 0 20px; }
.p-dl-result { max-width: 760px; margin-bottom: 16px; }
.p-dl-result .p-copy code { font: 500 var(--p-fs-meta)/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.p-dl-stores { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 8px; }
.p-dl-stores a { display: inline-flex; align-items: center; gap: 6px; color: var(--p-accent-ink); font-size: var(--p-fs-meta); font-weight: 600; }
.p-dl-note { margin: 0; }

/* ── QR 스튜디오 «추적 QR로 저장» ── */
.qr-track { display: grid; justify-items: center; gap: 8px; margin-top: 16px; text-align: center; }
.qr-track p { max-width: 360px; margin: 0; font-size: var(--p-fs-meta); line-height: 1.6; color: var(--p-ink-2); }
.qr-dl-size { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 12px; }
.qr-dl-size label { font-size: var(--p-fs-meta); font-weight: 600; color: var(--p-ink-2); }
.qr-dl-size .p-select { width: auto; }
.dl-btn svg { vertical-align: -3px; margin-right: 4px; }

/* ── 성과(2026-09-27) — 페이지·링크·QR 한곳, 지난 기간과 비교 ── */
.p-ins-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.p-ins-sentence { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--p-r-card); background: var(--p-accent-soft); color: var(--p-ink); font-size: var(--p-fs-body); font-weight: 600; line-height: 1.6; }
.p-cbars { display: flex; align-items: flex-end; gap: 4px; height: 160px; margin: 0; padding: 8px 0 0; list-style: none; }
.p-cbars li { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.p-cbars i { display: block; width: 100%; max-width: 28px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--p-accent); }
.p-cbars i.is-zero { background: var(--p-line); }
.p-cbars-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--p-fs-meta); color: var(--p-ink-2); font-variant-numeric: tabular-nums; }
.p-share { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.p-share li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.p-share-name { overflow: hidden; font-size: var(--p-fs-body); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.p-share-n { font-size: var(--p-fs-meta); color: var(--p-ink-2); font-variant-numeric: tabular-nums; }
.p-share-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--p-sunken); overflow: hidden; }
.p-share-bar b { display: block; height: 100%; border-radius: 999px; background: var(--p-accent); }
.p-ins-vs { font-size: var(--p-fs-meta); font-weight: 600; color: var(--p-ink-2); white-space: nowrap; }
.p-ins-vs.is-up { color: var(--p-good); }
.p-ins-vs.is-down { color: var(--p-bad); }
.p-ins-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--p-ink-2); font-weight: 600; text-decoration: none; }
.p-ins-back:hover { color: var(--p-ink); }
@media (max-width: 1023px) { .p-ins-grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  .p-cbars { height: 120px; gap: 2px; }
  .p-ins-table .c-prev, .p-ins-table .c-spark { display: none; }
}

/* ── 수집함(2026-09-27) — 모든 페이지 한곳 ── */
.p-inbox-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--p-divider); }
.p-inbox-item:first-child { border-top: 0; padding-top: 0; }
.p-inbox-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--p-fs-meta); color: var(--p-ink-2); }
.p-inbox-meta strong { font-size: var(--p-fs-body); color: var(--p-ink); }
.p-inbox-meta a { color: var(--p-accent-ink); font-weight: 600; }
.p-inbox-msg { grid-column: 1; margin: 6px 0 0; font-size: var(--p-fs-body); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.p-inbox-item[hidden] { display: none; }
.p-inbox-item.is-new { box-shadow: inset 3px 0 0 var(--p-accent); padding-left: 12px; }
.p-inbox-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.p-inbox-pager__info { color: var(--p-ink-2); font-size: var(--p-fs-meta); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .p-inbox-pager__info { order: -1; flex-basis: 100%; text-align: center; } }

/* ── 내 계정(2026-09-28) ── */
.p-account { max-width: 720px; margin-bottom: 16px; }
.p-account-who { display: grid; gap: 4px; }
.p-account-who strong { font-size: var(--p-fs-card); }
.p-account-who > span { color: var(--p-ink-2); }
.p-account-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ═════════════ 2026-09-28 진단 마무리 — 누구나 쓰기·글자 사다리·기다림 ═════════════ */
/* 고정 머리글(56)·폰 아래 탭(64)에 키보드 초점이 가리지 않게(WCAG 2.2 «초점이 가려지지 않음») */
html { scroll-padding-top: calc(56px + 16px); }
@media (max-width: 767px) { html:has(body.p-body) { scroll-padding-bottom: calc(64px + 16px + env(safe-area-inset-bottom)); } }

/* 머리글 글자를 사다리(16·14)에 — 사이트 머리글의 0.9rem(14.4px)이 프로 화면에 사다리 밖 크기로 섞여 있었다 */
body.p-ui .ds-header-tab, body.p-ui .ds-header-link { font-size: var(--p-fs-meta); }
/* 찾기 칸 16px — 아이폰은 16px 보다 작은 입력칸을 누르면 화면을 확대해 버린다 */
body.p-ui .ds-search-input { font-size: var(--p-fs-body); }

/* 줄이 스무 개 넘는 표는 알아서 촘촘하게(.is-compact) — «보통·촘촘» 토글 대신 정한 값. 폰은 누르는 자리 44px 때문에 보통 그대로 */
@media (max-width: 767px) { .p-table.is-compact td { padding-top: 14px; padding-bottom: 14px; } }

/* 남의 서버를 기다리는 폼(<form data-busy>) — 0.3초 넘으면 단추 글자가 «점검 중…»으로(돌아가는 표시는 두지 않는다) */
.p-btn[aria-busy="true"] { cursor: progress; }

/* 켜고 끄는 스위치(2026-09-28) — 페이지 편집기·링크 서랍이 같이 쓴다. 파랑 하나 */
.p-switch { position: relative; flex: none; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: var(--p-ink-off); cursor: pointer; transition: background var(--p-t) var(--p-ease); }
.p-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(9, 9, 11, .2); transition: transform var(--p-t) var(--p-ease); }
.p-switch[aria-checked="true"] { background: var(--p-accent); }
.p-switch[aria-checked="true"]::after { transform: translateX(18px); }
.p-switch:disabled { opacity: .45; cursor: not-allowed; }
.p-switch:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
.p-appopen { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--p-divider); }
.p-appopen-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.p-appopen-row b { display: block; font-size: var(--p-fs-body); }

/* 링크 서랍의 카톡 미리보기 카드(2026-09-28) — 대화방에 뜨는 모양을 흉내 낸 것(가로 1.91:1 그림 + 제목·설명·도메인) */
.p-kcard { max-width: 320px; overflow: hidden; border: 1px solid var(--p-line); border-radius: 12px; background: var(--p-surface); }
.p-kcard-img { aspect-ratio: 1.91 / 1; background: var(--p-sunken) center / cover no-repeat; }
.p-kcard-body { display: grid; gap: 2px; padding: 10px 12px; }
.p-kcard-body b { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: var(--p-fs-body); }
.p-kcard-body span { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--p-ink-2); font-size: var(--p-fs-meta); }
.p-kcard-body small { color: var(--p-ink-2); font-size: var(--p-fs-meta); }

/* 누르는 자리 44px — 홈 «가장 많이 쓰인 것»의 이름, 폰 수집함의 메일·전화(2026-09-28 재측정에서 19~21px) */
.p-top-name { display: block; overflow: hidden; color: inherit; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 767px) {
  .p-top-name { display: flex; align-items: center; min-height: 44px; }
  .p-inbox-meta a { display: inline-flex; align-items: center; min-height: 44px; }
}
