feat(project): add Excel font controls and reflow

This commit is contained in:
2026-10-03 05:47:57 +09:00
parent 494d84f7c2
commit dc2008c5b3
13 changed files with 146 additions and 42 deletions
+7 -2
View File
@@ -504,8 +504,9 @@ def goal_text_runs(body: Any, *, strict: bool = False) -> list[dict[str, Any]]:
if not isinstance(item, dict) or not isinstance(item.get("text"), str):
raise ValueError("서식 데이터가 올바르지 않습니다.")
run: dict[str, Any] = {"text": item["text"]}
if isinstance(item.get("bold"), bool):
run["bold"] = item["bold"]
for key in ("bold", "italic", "underline"):
if isinstance(item.get(key), bool):
run[key] = item[key]
if re.fullmatch(r"#[0-9a-fA-F]{6}", str(item.get("color", ""))):
run["color"] = item["color"].lower()
size = item.get("size")
@@ -533,6 +534,10 @@ def goal_text_html(body: Any) -> str:
style = []
if "bold" in run:
style.append("font-weight:" + ("700" if run["bold"] else "400"))
if "italic" in run:
style.append("font-style:" + ("italic" if run["italic"] else "normal"))
if "underline" in run:
style.append("text-decoration:" + ("underline" if run["underline"] else "none"))
if "color" in run:
style.append("color:" + run["color"])
if "size" in run:
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261003a" />
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261003a" />
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -39,16 +39,24 @@
{% if is_admin and goals_enabled and board %}
<div class="pj-goal-format" id="pj-goal-format" role="toolbar" aria-label="선택한 글자 서식" hidden>
<div class="pj-goal-color-picker"><span>색상</span>
<button type="button" class="pj-goal-color-toggle" data-goal-format="color" aria-label="글자 색상" aria-expanded="false" aria-controls="pj-goal-color-grid" disabled><span class="pj-goal-color-preview"></span></button>
<div class="pj-goal-format-group pj-goal-color-picker">
<button type="button" class="pj-goal-format-btn pj-goal-color-toggle" data-goal-format="color" aria-label="글자 색상" title="글자 색상" aria-expanded="false" aria-controls="pj-goal-color-grid" disabled><span class="pj-goal-color-letter" aria-hidden="true">가<span class="pj-goal-color-preview"></span></span><svg class="pj-goal-format-chevron" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true"><path d="m2 4 3 3 3-3"/></svg></button>
<div class="pj-goal-color-grid" id="pj-goal-color-grid" role="group" aria-label="글자 색상 선택" hidden>
{% for color in ('#000000', '#4B5563', '#9CA3AF', '#DC2626', '#EA580C', '#CA8A04', '#16A34A', '#0891B2', '#2563EB', '#7C3AED', '#DB2777', '#FFFFFF') %}
<button type="button" class="pj-goal-text-swatch" data-goal-color="{{ color }}" style="--swatch: {{ color }}" title="{{ color }}" aria-label="{{ color }}" aria-pressed="false" disabled></button>
{% endfor %}
</div>
</div>
<label>굵기 <select data-goal-format="bold" aria-label="글자 굵기" disabled><option value="400">보통</option><option value="700">굵게</option></select></label>
<label>크기 <select data-goal-format="size" aria-label="글자 크기" disabled>{% for size in (10, 12, 14, 16, 18, 20, 24, 28, 32) %}<option value="{{ size }}"{% if size == 14 %} selected{% endif %}>{{ size }}px</option>{% endfor %}</select></label>
<div class="pj-goal-format-group" role="group" aria-label="글자 크기">
<button type="button" class="pj-goal-format-btn" data-goal-format="size-up" aria-label="글자 크기 2px 키우기" title="글자 크기 2px 키우기" disabled><span class="pj-goal-font-letter" aria-hidden="true">가</span><svg class="pj-goal-font-arrow" viewBox="0 0 10 14" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M5 9V2M2 5l3-3 3 3"/></svg></button>
<button type="button" class="pj-goal-format-btn" data-goal-format="size-down" aria-label="글자 크기 2px 줄이기" title="글자 크기 2px 줄이기" disabled><span class="pj-goal-font-letter" aria-hidden="true">가</span><svg class="pj-goal-font-arrow" viewBox="0 0 10 14" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M5 2v7M2 6l3 3 3-3"/></svg></button>
<output class="pj-goal-size-value" data-goal-format="size" aria-label="선택한 글자 크기">14px</output>
</div>
<div class="pj-goal-format-group" role="group" aria-label="글자 모양">
{% for key, label in (('bold', '굵게'), ('italic', '기울임'), ('underline', '밑줄')) %}
<button type="button" class="pj-goal-format-btn" data-goal-format="{{ key }}" aria-label="{{ label }}" title="{{ label }}" aria-pressed="false" disabled><span class="pj-goal-font-letter" aria-hidden="true">가</span></button>
{% endfor %}
</div>
<button type="button" class="pj-btn" data-goal-format="reset" disabled>서식 초기화</button>
</div>
{% endif %}
@@ -197,7 +205,7 @@
{% if is_admin %}
<div class="pj-goal-foot">
<button type="button" class="pj-btn" id="pj-goal-area-add">+ 업무 영역 추가</button>
<span class="pj-goal-note">칸을 고치면 바로 저장됩니다. 글자를 드래그해 선택하면 선택 영역 위의 메뉴에서 12색 견본·굵기·크기를 고르거나 서식을 초기화할 수 있습니다. 모든 행의 셀 오른쪽 경계를 끌어 열 너비를 조절합니다. 숫자 칸을 비우면 지워집니다. 구역·항목 칸을 우클릭하거나 칸의 ⋮ 버튼(키보드 Tab·Enter, 터치)을 누르면 색·순서·줄 추가·삭제 메뉴가 나옵니다.
<span class="pj-goal-note">칸을 고치면 바로 저장됩니다. 글자를 드래그해 선택하면 선택 영역 위에서 12색 견본·크기 2px 증감·굵게·기울임·밑줄·서식 초기화를 사용할 수 있습니다. 모든 행의 셀 오른쪽 경계를 끌어 열 너비를 조절합니다. 숫자 칸을 비우면 지워집니다. 구역·항목 칸을 우클릭하거나 칸의 ⋮ 버튼(키보드 Tab·Enter, 터치)을 누르면 색·순서·줄 추가·삭제 메뉴가 나옵니다.
{%- if board.halves %} 칸을 마우스로 끌어 여러 칸을 고른 뒤 우클릭 → 셀 병합, 병합된 칸은 우클릭 → 병합 해제(글은 왼쪽 위 칸에 남음).{% endif %}
월 이름을 누르면 그 달 주간 회의록이 열립니다.</span>
</div>
@@ -212,6 +220,6 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project-goal-text.js?v=20261003a" defer></script>
<script src="/static/project-goal-text.js?v=20261003b" defer></script>
<script src="/static/project.js?v=20261003a" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261003a" />
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
<link rel="stylesheet" href="/static/project-help.css?v=20261002d" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -88,14 +88,15 @@
<li><b>수신함</b> — 나를 태그한 작업과 알림. 숫자 배지는 아직 확인하지 않은 @태그 수입니다. (<a href="#inbox">17장</a>)</li>
<li><b>내 작업</b> — 내가 담당자인 작업 모음. 숫자 배지는 아직 끝나지 않은 작업 수입니다. (<a href="#mytasks">15장</a>)</li>
<li><b>휴지통</b> — 지운 작업을 3개월 보관합니다. 관리자에게만 보입니다. (<a href="#trash">19장</a>)</li>
<li>왼쪽 메뉴의 오른쪽 경계를 끌면 너비를 최소 170px까지 줄일 수 있습니다. 경계에 키보드 포커스를 놓고 좌우 방향키로도 조절할 수 있으며 너비는 내 브라우저에 기억됩니다.</li>
<li>왼쪽 메뉴의 오른쪽 경계를 끌면 너비를 최소 170px까지 줄일 수 있습니다. 경계에 키보드 포커스를 놓고 좌우 방향키로도 조절할 수 있으며 너비는 내 브라우저에 기억됩니다. 전체 멤버는 메뉴 너비에 맞춰 4열 또는 3열로 자동 배치됩니다.</li>
<li><b>목표</b> — 누르면 바로 아래에 연도가 펼쳐집니다. 연도를 누르면 오른쪽에 그해 전체 목표가 한 표로 나옵니다 —
맨 위에 <b>매출</b>(목표·실적·달성률)과 <b>로아스</b>(목표·실적, 단위 %)를 달마다, 그 아래에 <b>업무 영역</b>(상품·마케팅·컨텐츠·유통 등)별로
연간·분기·월별 계획을 적습니다. 3·6·9·12월 오른쪽에 <b>1~4분기</b> 칸이 있고, 매출의 <b>연간·분기</b> 칸은 월 합계,
<b>달성</b>은 실적÷목표(100% 이상 초록)로 저절로 계산됩니다. 분기 칸 머리의 <b>‹</b> 버튼을 누르면 그 분기의 월 칸 3개가
접히고, 다시 누르면 펼쳐집니다(접힌 상태는 내 브라우저에 기억). 월 이름을 누르면 그 달 <b>주간 회의록</b>이 열립니다.
<b>입력은 관리자만</b> 할 수 있고(칸을 고치면 바로 저장), 다른 직원은 보기만 합니다. 관리자는 <b>+ 연도 추가</b>로 새해 목표를
만듭니다(이전 연도의 업무 영역 구성을 그대로 가져옴). 글 칸에서 <b>글자를 드래그해 선택</b>하면 선택한 글자 위에 나타나는 서식 도구로 <b>색상·굵기·크기</b>를 바꿀 수 있으며 선택한 글자에만 적용됩니다.
만듭니다(이전 연도의 업무 영역 구성을 그대로 가져옴). 글 칸에서 <b>글자를 드래그해 선택</b>하면 선택한 글자 위에 나타나는 엑셀 형태 서식 도구로 <b>색상·크기·굵게·기울임·밑줄</b>을 바꿀 수 있으며 선택한 글자에만 적용됩니다.
위/아래 화살표가 붙은 글자 버튼은 크기를 <b>2px씩</b> 키우거나 줄입니다(10~32px). 굵게·기울임·밑줄 버튼은 다시 누르면 해당 서식을 해제합니다.
<span class="pjh-ui">서식 초기화</span>는 선택한 글자를 기본 서식으로 되돌리며 내용은 유지합니다. 서식도 자동으로 저장됩니다. 색상은 12색의 네모 견본에서 고릅니다.
<b>모든 행의 셀 오른쪽 경계</b>를 끌어 열 너비를 조절하고, 더블클릭하면 기본 너비로 돌아갑니다(병합 칸은 오른쪽 끝 열).
영역·줄 이름은 <b>눌러서 그 자리에서 고치고</b>(Enter 저장, Esc 취소),
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261003a" />
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261003a" />
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261003a" />
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261003a" />
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
+27 -6
View File
@@ -2,12 +2,19 @@
(function () {
"use strict";
const PREFIX = "pj-rich:v1:";
const STYLE_KEYS = ["bold", "italic", "underline", "color", "size"];
const TOGGLES = ["bold", "italic", "underline"];
function styles(node, inherited) {
const s = Object.assign({}, inherited);
if (node.nodeType !== 1) return s;
const css = node.style;
if (node.tagName === "B" || node.tagName === "STRONG") s.bold = true;
if (css.fontWeight) s.bold = css.fontWeight === "bold" || Number(css.fontWeight) >= 600;
if (node.tagName === "I" || node.tagName === "EM") s.italic = true;
if (css.fontStyle) s.italic = css.fontStyle === "italic" || css.fontStyle === "oblique";
if (node.tagName === "U") s.underline = true;
const decoration = css.textDecorationLine || css.textDecoration;
if (decoration) s.underline = decoration.includes("underline");
const size = parseInt(css.fontSize, 10);
if (size >= 10 && size <= 32) s.size = size;
if (css.color) {
@@ -38,7 +45,7 @@
runs.forEach(function (run) {
if (!run.text) return;
const prev = out[out.length - 1];
if (prev && prev.bold === run.bold && prev.color === run.color && prev.size === run.size) prev.text += run.text;
if (prev && STYLE_KEYS.every(function (key) { return prev[key] === run[key]; })) prev.text += run.text;
else out.push(Object.assign({}, run));
});
return out;
@@ -60,6 +67,8 @@
const span = document.createElement("span");
span.textContent = r.text;
if (typeof r.bold === "boolean") span.style.fontWeight = r.bold ? "700" : "400";
if (typeof r.italic === "boolean") span.style.fontStyle = r.italic ? "italic" : "normal";
if (typeof r.underline === "boolean") span.style.textDecoration = r.underline ? "underline" : "none";
if (/^#[\da-f]{6}$/i.test(r.color || "")) span.style.color = r.color;
if (Number.isInteger(r.size) && r.size >= 10 && r.size <= 32) span.style.fontSize = r.size + "px";
editor.appendChild(span.style.cssText ? span : document.createTextNode(r.text));
@@ -159,9 +168,16 @@
const value = chosen[0] && chosen[0][key];
return chosen.every(function (r) { return r[key] === value; }) && value !== undefined ? value : fallback;
}
toolbar.querySelector("[data-goal-format='bold']").value = uniform("bold", false) ? "700" : "400";
TOGGLES.forEach(function (key) {
const all = chosen.every(function (r) { return r[key] === true; });
const some = chosen.some(function (r) { return r[key] === true; });
toolbar.querySelector("[data-goal-format='" + key + "']").setAttribute("aria-pressed", all ? "true" : some ? "mixed" : "false");
});
showColor(uniform("color", "#000000"));
toolbar.querySelector("[data-goal-format='size']").value = String(uniform("size", 14));
const sizes = chosen.map(function (r) { return r.size || 14; });
toolbar.querySelector("[data-goal-format='size']").textContent = sizes.every(function (n) { return n === sizes[0]; }) ? sizes[0] + "px" : "혼합";
toolbar.querySelector("[data-goal-format='size-up']").disabled = sizes.every(function (n) { return n >= 32; });
toolbar.querySelector("[data-goal-format='size-down']").disabled = sizes.every(function (n) { return n <= 10; });
toolbar.hidden = false;
place();
}
@@ -179,7 +195,8 @@
else {
if (a > pos) out.push(Object.assign({}, run, { text: run.text.slice(0, a - pos) }));
const middle = Object.assign({}, run, { text: run.text.slice(a - pos, b - pos) });
if (key === "reset") { delete middle.color; delete middle.bold; delete middle.size; }
if (key === "reset") STYLE_KEYS.forEach(function (style) { delete middle[style]; });
else if (key === "size-delta") middle.size = Math.max(10, Math.min(32, (middle.size || 14) + value));
else middle[key] = value;
out.push(middle);
if (b < end) out.push(Object.assign({}, run, { text: run.text.slice(b - pos) }));
@@ -199,8 +216,12 @@
if (!btn) return;
apply("color", btn.dataset.goalColor.toLowerCase()); closeColors();
});
toolbar.querySelector("[data-goal-format='bold']").addEventListener("change", function (e) { apply("bold", e.target.value === "700"); });
toolbar.querySelector("[data-goal-format='size']").addEventListener("change", function (e) { apply("size", Number(e.target.value)); });
TOGGLES.forEach(function (key) {
const btn = toolbar.querySelector("[data-goal-format='" + key + "']");
btn.addEventListener("click", function () { apply(key, btn.getAttribute("aria-pressed") !== "true"); });
});
toolbar.querySelector("[data-goal-format='size-up']").addEventListener("click", function () { apply("size-delta", 2); });
toolbar.querySelector("[data-goal-format='size-down']").addEventListener("click", function () { apply("size-delta", -2); });
toolbar.querySelector("[data-goal-format='reset']").addEventListener("click", function () { apply("reset"); });
document.addEventListener("mousedown", function (e) {
if (toolbar.contains(e.target) || (saved && saved.editor.contains(e.target))) return;
+28 -10
View File
@@ -113,7 +113,7 @@
.pj-side-resizer { position: absolute; top: 0; bottom: 0; left: var(--pj-side-w, 250px); width: 8px; padding: 0; border: 0; background: transparent; cursor: col-resize; z-index: 12; }
.pj-side-resizer:hover, .pj-side-resizer:focus-visible, .pj-side-resizer.is-dragging { background: var(--pj-accent-tint); outline: none; }
html.pj-side-resizing, html.pj-side-resizing * { cursor: col-resize !important; user-select: none !important; }
.pj-side { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; padding-right: 14px; }
.pj-side { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; padding-right: 14px; container: pj-side / inline-size; }
.pj-main { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; }
/* ── 자체 스크롤 패널(내 업무/좌측 목록/홈 프로젝트 목록/보드)의 스크롤 막대 ──
@@ -1007,13 +1007,16 @@ html.pj-ui-scale #pj-timeline { zoom: calc(1 / var(--pj-z)); --tz: var(--pj-z);
.pj-member-pick-avatar img.pj-member-pick-icon { width: 36px; height: 36px; }
.pj-member-pick-stacked .pj-member-pick-name { font-size: 12.5px; }
/* ── 좌측 사이드바 "전체 멤버" — 4열 그리드, 아이콘 아래 이름(새 프로젝트
/* ── 좌측 사이드바 "전체 멤버" — 메뉴의 실제 내부 폭에 따라 4열↔3열, 아이콘 아래 이름(새 프로젝트
모달의 pj-member-pick-stacked 와 같은 아이콘 크기 재사용). ── */
.pj-allmembers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 4px; }
.pj-allmembers-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 4px; }
@container pj-side (max-width: 207px) {
.pj-allmembers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pj-allmember-item {
display: flex; flex-direction: column; align-items: center; gap: 4px;
padding: 6px 2px; border: none; background: none; border-radius: 8px; cursor: pointer;
font: inherit; width: 100%;
font: inherit; width: 100%; min-width: 0; box-sizing: border-box;
}
.pj-allmember-item:hover { background: #f5f6f8; }
.pj-allmember-item .pj-member-pick-icon.material-symbols-outlined { font-size: 40px; }
@@ -2719,13 +2722,28 @@ html[data-pj-font="nanum-square-round"] { --pj-font: "NanumSquareRound", var(--p
.pj-options-dialog p { font-size: 12px; color: var(--pj-ink-soft); }
.pj-options-dialog .pj-options-error { color: #c22b10; }
.pj-options-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.pj-goal-format { position: fixed; z-index: 1200; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 8px 10px; max-width: calc(100vw - 16px); box-sizing: border-box; border: 1px solid var(--pj-border); border-radius: 8px; box-shadow: 0 4px 16px #0002; background: #fff; color: var(--pj-ink); font-family: var(--pj-font); font-size: 12px; }
.pj-goal-format { position: fixed; z-index: 1200; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 8px; max-width: calc(100vw - 16px); box-sizing: border-box; border: 1px solid var(--pj-border); border-radius: 8px; box-shadow: 0 4px 16px #0002; background: #fff; color: var(--pj-ink); font-family: var(--pj-font); font-size: 12px; }
.pj-goal-format[hidden], .pj-goal-color-grid[hidden] { display: none; }
.pj-goal-format label { display: flex; align-items: center; gap: 6px; }
.pj-goal-format select { padding: 4px; border: 1px solid #d8dce2; border-radius: 4px; font: inherit; }
.pj-goal-color-picker { position: relative; display: flex; align-items: center; gap: 6px; }
.pj-goal-color-toggle { width: 30px; height: 28px; padding: 4px; border: 1px solid #d8dce2; border-radius: 4px; background: #fff; cursor: pointer; }
.pj-goal-color-preview { display: block; width: 100%; height: 100%; background: #000; box-shadow: inset 0 0 0 1px #0002; }
.pj-goal-format-group { display: inline-flex; align-items: center; gap: 2px; }
.pj-goal-format-group + .pj-goal-format-group { border-left: 1px solid var(--pj-border); padding-left: 6px; }
.pj-goal-format .pj-goal-format-btn, .pj-goal-format [data-goal-format="reset"] { display: inline-flex; align-items: center; justify-content: center; height: 32px; box-sizing: border-box; border: 1px solid transparent; border-radius: 4px; padding: 0 8px; background: #fff; color: inherit; font: inherit; line-height: 1; cursor: pointer; }
.pj-goal-format .pj-goal-format-btn { min-width: 32px; }
.pj-goal-format .pj-goal-format-btn:hover, .pj-goal-format [data-goal-format="reset"]:hover { background: #f3f4f6; }
.pj-goal-format .pj-goal-format-btn[aria-pressed="true"] { border-color: #b5b9c0; background: #e8eaed; }
.pj-goal-format .pj-goal-format-btn[aria-pressed="mixed"] { background: #f3f4f6; box-shadow: inset 0 -2px #9ca3af; }
.pj-goal-format .pj-goal-format-btn:focus-visible { outline: 2px solid var(--pj-accent); outline-offset: 1px; }
.pj-goal-format [data-goal-format="reset"] { border-color: #d8dce2; margin-left: 4px; }
.pj-goal-color-picker { position: relative; display: flex; align-items: center; }
.pj-goal-color-toggle { gap: 5px; }
.pj-goal-color-letter { display: flex; flex-direction: column; align-items: stretch; font-size: 17px; line-height: 18px; }
.pj-goal-color-preview { display: block; width: 18px; height: 3px; background: #000; box-shadow: inset 0 0 0 1px #0002; }
.pj-goal-format-chevron { width: 8px; height: 8px; }
.pj-goal-font-letter { font-size: 16px; }
.pj-goal-font-arrow { width: 10px; height: 14px; align-self: flex-start; margin-top: 4px; color: #2563eb; }
.pj-goal-size-value { min-width: 36px; text-align: center; color: var(--pj-ink-soft); font-variant-numeric: tabular-nums; }
.pj-goal-format [data-goal-format="bold"] .pj-goal-font-letter { font-weight: 700; }
.pj-goal-format [data-goal-format="italic"] .pj-goal-font-letter { font-style: italic; }
.pj-goal-format [data-goal-format="underline"] .pj-goal-font-letter { text-decoration: underline; text-underline-offset: 3px; }
.pj-goal-color-grid { position: absolute; bottom: calc(100% + 8px); left: 0; display: grid; grid-template-columns: repeat(6, 26px); gap: 6px; padding: 8px; background: #fff; border: 1px solid var(--pj-border); border-radius: 6px; box-shadow: 0 4px 12px #0002; }
.pj-goal-color-grid.is-below { bottom: auto; top: calc(100% + 8px); }
.pj-goal-text-swatch { width: 26px; height: 26px; border: 1px solid #0003; border-radius: 3px; background: var(--swatch); cursor: pointer; padding: 0; }