/* =============================================
   웹툴 공통 스타일 (tool 페이지 전용)
   - tool 페이지(header의 $is_tool_page)에서만 로드
   - 개별 툴의 인라인 <style>를 여기로 통합해 공통화/유지보수 용이
   - 색상/간격은 style.css의 :root 디자인 토큰을 그대로 사용
   ============================================= */

/* ===============================================
   웹툴 페이지 레이아웃 · 목록 · 상세 (디자인 개선)
   - style.css 이후 로드되어 기존 tool-* 규칙을 덮어씀
   - 좌우 여백 축소, 모바일 최적화
   =============================================== */
.tool-wrap { max-width: 1100px; margin: 0 auto; padding: 22px 16px 64px; }
@media (max-width: 640px){ .tool-wrap { padding: 14px 12px 44px; } }

/* 그룹 아이콘 색상(배경 없이 선 색상만) */
.tool-card-ico.g-text, .tool-detail-badge.g-text, .tg-ico.g-text { color:#1a56db; }
.tool-card-ico.g-calc, .tool-detail-badge.g-calc, .tg-ico.g-calc { color:#0e9f6e; }
.tool-card-ico.g-gen,  .tool-detail-badge.g-gen,  .tg-ico.g-gen  { color:#7c3aed; }
.tg-ico.g-pop { color:#ef4444; }

/* ---- 히어로 + 검색 ---- */
.tool-hero { text-align: center; padding: 6px 0 2px; }
.tool-hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem); font-weight: 800; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block;
}
.tool-hero p { color: var(--muted); margin-top: 6px; font-size: .98rem; }
.tool-hero p b { color: var(--primary); }
.tool-search {
  position: relative; max-width: 540px; margin: 20px auto 0; display: flex; align-items: center;
}
.tool-search .ic { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
.tool-search input {
  width: 100%; border: 1px solid var(--border); border-radius: 30px; background: var(--card-bg);
  padding: 13px 18px 13px 46px; font-size: 1rem; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.tool-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(26,86,219,.12); }

/* ---- 필터 칩 ---- */
.tool-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 6px; }
.tool-chip {
  border: 1px solid var(--border); background: var(--card-bg); color: var(--text-sub);
  border-radius: 22px; padding: 8px 15px; font-size: .88rem; font-weight: 600; cursor: pointer; transition: all .15s;
}
.tool-chip:hover { border-color: var(--primary); color: var(--primary); }
.tool-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow); }

/* ---- 그룹 제목 ---- */
.tool-group { margin-top: 30px; }
.tool-group-title { display: flex; align-items: center; gap: 9px; font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; padding-left: 0; }
.tool-group-title::before { content: none !important; display: none !important; }
.tg-ico { display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: none; }
.tg-count { font-size: .76rem; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 20px; padding: 2px 9px; }

/* ---- 카드 그리드 ---- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
@media (max-width: 640px){ .tool-grid { grid-template-columns: 1fr; gap: 10px; } }
.tool-card {
  display: flex; align-items: center; gap: 13px; padding: 14px 15px; text-decoration: none; color: inherit;
  border: 1px solid var(--border); border-radius: 15px; background: var(--card-bg); transition: transform .14s, box-shadow .14s, border-color .14s;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow-md); }
.tool-card-ico { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; flex: none; font-size: 1.35rem; }
.tool-card.no-ico { padding-left: 16px; }
.tool-card-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tool-card-name { font-weight: 700; font-size: .98rem; color: var(--text); }
.tool-card-desc {
  font-size: .8rem; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tool-card-arrow { flex: none; color: #cbd5e1; transition: transform .14s, color .14s; }
.tool-card:hover .tool-card-arrow { color: var(--primary); transform: translateX(3px); }
.tool-empty-msg { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---- 상세 페이지 ---- */
.tool-breadcrumb { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.tool-breadcrumb a { color: var(--muted); text-decoration: none; }
.tool-breadcrumb a:hover { color: var(--primary); }
.tool-detail { background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.tool-detail-head { display: flex; align-items: center; gap: 16px; padding: 24px; border-bottom: 1px solid var(--border-soft); background: linear-gradient(135deg, var(--primary-light), #fff 70%); }
.tool-detail-badge { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; flex: none; }
.tool-detail-headtx h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; }
.tool-detail-headtx p { color: var(--text-sub); font-size: .92rem; margin-top: 4px; line-height: 1.5; }
.tool-body { padding: 24px; }
@media (max-width: 640px){
  .tool-detail-head { padding: 16px; gap: 12px; }
  .tool-detail-badge { width: 46px; height: 46px; border-radius: 13px; font-size: 1.3rem; }
  .tool-detail-headtx h1 { font-size: 1.2rem; }
  .tool-body { padding: 15px; }
}

/* ---- 관련 도구 ---- */
.tool-related { margin-top: 30px; }
.tool-related-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-related-card {
  border: 1px solid var(--border); border-radius: 11px; padding: 9px 14px; background: var(--card-bg);
  text-decoration: none; color: var(--text-sub); font-size: .9rem; font-weight: 600; transition: all .14s;
}
.tool-related-card:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.tool-related-card.all { color: var(--primary); }

/* -----------------------------------------------
   텍스트 비교(diff) — /tool/text-diff
----------------------------------------------- */
.tool-diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .tool-diff-grid { grid-template-columns: 1fr; } }

.tool-diff-summary { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 2px; font-size: .9rem; }
.tool-diff-summary b { font-weight: 700; }
.tool-diff-summary .add { color: #15803d; }
.tool-diff-summary .del { color: #b91c1c; }

.tool-diff-result {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: auto; background: var(--card-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86rem; line-height: 1.6;
}
.tool-diff-line { display: flex; white-space: pre-wrap; word-break: break-word; }
.tool-diff-line .gutter {
  flex: 0 0 2.2em; text-align: center; color: var(--muted); user-select: none;
  border-right: 1px solid var(--border); background: var(--bg);
}
.tool-diff-line .text { flex: 1; padding: 0 10px; }
.tool-diff-line.add { background: #e7f7ec; }
.tool-diff-line.add .gutter { background: #d6f0de; color: #15803d; }
.tool-diff-line.del { background: #fdeaea; }
.tool-diff-line.del .gutter { background: #f7d6d6; color: #b91c1c; }
.tool-diff-empty { padding: 18px; text-align: center; color: var(--muted); }

/* -----------------------------------------------
   공통 유틸 / Base64 — /tool/base64
----------------------------------------------- */
.tool-divider { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.tool-b64-img { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-b64-preview {
  display: block; max-width: 100%; max-height: 220px; margin: 12px 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg);
}

/* -----------------------------------------------
   줄 정리 — /tool/line-tools (체크박스 옵션 그리드)
----------------------------------------------- */
.tool-check-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 16px; margin: 12px 0;
}
.tool-check-grid label {
  display: flex; align-items: center; gap: 7px; font-size: .92rem; color: var(--text-sub); cursor: pointer;
}

/* -----------------------------------------------
   Markdown 미리보기 — /tool/markdown
----------------------------------------------- */
.tool-md-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .tool-md-grid { grid-template-columns: 1fr; } }
.tool-md-preview {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; background: var(--card-bg); overflow: auto; min-height: 200px; line-height: 1.7;
}
.tool-md-preview > :first-child { margin-top: 0; }
.tool-md-preview h1, .tool-md-preview h2, .tool-md-preview h3 { margin: 1em 0 .5em; line-height: 1.3; }
.tool-md-preview p, .tool-md-preview ul, .tool-md-preview ol, .tool-md-preview blockquote { margin: .6em 0; }
.tool-md-preview ul, .tool-md-preview ol { padding-left: 1.4em; }
.tool-md-preview code {
  background: var(--bg); padding: .12em .35em; border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em;
}
.tool-md-preview pre {
  background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: var(--radius); overflow: auto; margin: .7em 0;
}
.tool-md-preview pre code { background: none; padding: 0; color: inherit; }
.tool-md-preview blockquote {
  border-left: 3px solid var(--border); padding-left: 12px; color: var(--muted);
}
.tool-md-preview table { border-collapse: collapse; }
.tool-md-preview th, .tool-md-preview td { border: 1px solid var(--border); padding: 6px 10px; }
.tool-md-preview img { max-width: 100%; }

/* -----------------------------------------------
   색상 변환기 — /tool/color-converter
----------------------------------------------- */
.tool-color-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tool-color-top input[type=color] {
  width: 64px; height: 64px; border: 1px solid var(--border); border-radius: var(--radius);
  background: none; cursor: pointer; padding: 4px;
}
.tool-color-swatch {
  flex: 1; height: 64px; border: 1px solid var(--border); border-radius: var(--radius);
}
.tool-color-row { display: flex; gap: 8px; align-items: center; }
.tool-color-row .tool-input { flex: 1; }
.tool-btn.sm { padding: 6px 12px; font-size: .85rem; flex: none; }

/* -----------------------------------------------
   정규식 테스트기 — /tool/regex
----------------------------------------------- */
.tool-regex-line { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.tool-regex-line .tool-input { flex: 1; }
.tool-regex-slash { color: var(--muted); font-family: ui-monospace, monospace; font-size: 1.2rem; }
.tool-regex-highlight {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
  background: var(--card-bg); white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.7; min-height: 60px;
}
.tool-regex-highlight mark { background: #fde68a; color: #92400e; border-radius: 3px; padding: 0 1px; }
.tool-regex-matches { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.tool-regex-matches .rx-row {
  border: 1px solid var(--border-soft); border-radius: 8px; padding: 7px 10px;
  font-family: ui-monospace, monospace; font-size: .86rem; background: var(--bg);
}
.tool-regex-matches .rx-pos { color: var(--muted); font-size: .8rem; }
.tool-regex-matches .rx-groups { margin-top: 4px; color: var(--text-sub); }
.tool-regex-matches .g { color: var(--primary); font-weight: 700; }

/* -----------------------------------------------
   해시 생성기 — /tool/hash
----------------------------------------------- */
.tool-hash-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.tool-hash-row { display: flex; align-items: center; gap: 8px; }
.tool-hash-row .lbl { flex: 0 0 80px; font-weight: 600; font-size: .85rem; color: var(--text-sub); }
.tool-hash-row .tool-input { flex: 1; }
@media (max-width: 560px) {
  .tool-hash-row { flex-wrap: wrap; }
  .tool-hash-row .lbl { flex: 0 0 100%; }
}

/* -----------------------------------------------
   결과 표 — 연봉 실수령액(/tool/salary), 시급·주휴수당(/tool/wage)
----------------------------------------------- */
.tool-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .92rem; }
.tool-table th, .tool-table td {
  border-bottom: 1px solid var(--border-soft); padding: 9px 12px; text-align: left;
}
.tool-table th { color: var(--text-sub); font-weight: 500; }
.tool-table td { text-align: right; font-variant-numeric: tabular-nums; }
.tool-table tr.sum th, .tool-table tr.sum td {
  border-top: 2px solid var(--border); border-bottom: none; font-weight: 700; color: var(--text);
}

/* -----------------------------------------------
   색상 팔레트·그라데이션 — /tool/palette
----------------------------------------------- */
.tool-palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; }
@media (max-width: 560px) { .tool-palette { grid-template-columns: repeat(2, 1fr); } }
.tool-swatch {
  height: 96px; border-radius: var(--radius); cursor: pointer; position: relative;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px;
  border: 1px solid rgba(0,0,0,.06); transition: transform .12s;
}
.tool-swatch:hover { transform: translateY(-3px); }
.tool-swatch span {
  background: rgba(255,255,255,.85); color: #111; font-size: .74rem; font-weight: 600;
  padding: 2px 7px; border-radius: 20px; font-family: ui-monospace, monospace;
}
.tool-swatch.copied span::after { content: " ✓ 복사됨"; }
.tool-gradient { height: 120px; border-radius: var(--radius); border: 1px solid var(--border); margin: 12px 0; }
.tool-range { accent-color: var(--primary); }
.tool-color-top input[type=color], .tool-row input[type=color] {
  width: 48px; height: 40px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; padding: 3px; background: none;
}

/* -----------------------------------------------
   스톱워치·타이머 — /tool/stopwatch
----------------------------------------------- */
.tool-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(2.4rem, 9vw, 3.6rem); font-weight: 700; text-align: center;
  letter-spacing: 1px; margin: 10px 0; color: var(--text); font-variant-numeric: tabular-nums;
}
.tool-time.done { color: var(--primary); animation: tool-blink .4s ease-in-out 3; }
@keyframes tool-blink { 50% { opacity: .25; } }
.tool-laps { list-style: none; margin: 10px 0 0; padding: 0; max-height: 220px; overflow: auto; }
.tool-laps li {
  display: flex; justify-content: space-between; padding: 7px 10px; border-bottom: 1px solid var(--border-soft);
  font-family: ui-monospace, monospace; font-size: .9rem;
}
.tool-laps li:nth-child(odd) { background: var(--bg); }

/* -----------------------------------------------
   이미지 도구 — /tool/image-resize, /tool/image-convert
----------------------------------------------- */
.tool-imgdrop {
  border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 28px 16px;
  text-align: center; color: var(--muted); transition: border-color .15s, background .15s;
}
.tool-imgdrop.over { border-color: var(--primary); background: var(--primary-light); }
.tool-imgdrop p { margin-bottom: 10px; }
.tool-imgdrop .tool-note { display: block; margin-top: 8px; }

/* -----------------------------------------------
   유니코드 — /tool/unicode
----------------------------------------------- */
.tool-unicode-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tool-unicode-list .uc-cell {
  display: flex; flex-direction: column; align-items: center; min-width: 62px;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 6px; background: var(--card-bg);
}
.uc-cell .uc-char { font-size: 1.5rem; line-height: 1.2; }
.uc-cell .uc-code { font-family: ui-monospace, monospace; font-size: .74rem; color: var(--primary); margin-top: 3px; }
.uc-cell .uc-dec { font-size: .7rem; color: var(--muted); }

/* -----------------------------------------------
   색상 대비 — /tool/contrast
----------------------------------------------- */
.tool-contrast-preview {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 18px; margin: 12px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.tool-contrast-preview .big { font-size: 1.7rem; font-weight: 700; }
.tool-contrast-preview .small { font-size: .95rem; }

/* -----------------------------------------------
   세계 시계 — /tool/worldclock
----------------------------------------------- */
.tool-clock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tool-clock-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; text-align: center; background: var(--card-bg);
  display: flex; flex-direction: column; gap: 2px;
}
.tool-clock-card .city { font-weight: 600; font-size: .9rem; color: var(--text-sub); }
.tool-clock-card .time { font-family: ui-monospace, monospace; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tool-clock-card .date { font-size: .78rem; }

/* -----------------------------------------------
   학점(GPA) — /tool/gpa
----------------------------------------------- */
.tool-gpa-table td { text-align: center; }
.tool-gpa-table .tool-text { width: 100%; }
.tool-gpa-table .gp-del { padding: 4px 10px; }

/* -----------------------------------------------
   생성기·기타 2차 — 바코드/파비콘/크롭/섀도/팀
----------------------------------------------- */
.tool-barcode-box { text-align: center; margin-top: 14px; overflow: auto; }
.tool-barcode-box svg { max-width: 100%; }

.tool-favicon-list { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.tool-favicon-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--card-bg);
}
.tool-favicon-cell img { image-rendering: auto; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 50%/16px 16px; }
.tool-favicon-cell span { font-size: .78rem; color: var(--muted); }

.tool-crop-canvas { max-width: 100%; margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 50%/20px 20px; }

.tool-shadow-stage {
  display: flex; align-items: center; justify-content: center; padding: 44px; margin: 16px 0;
  background: var(--bg); border-radius: var(--radius);
}
.tool-shadow-box { width: 120px; height: 120px; border-radius: 14px; background: var(--card-bg); }

.tool-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.tool-team-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--card-bg); }
.tool-team-card h4 { margin-bottom: 8px; font-size: .95rem; }
.tool-team-card ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tool-team-card li { padding: 4px 0; border-bottom: 1px solid var(--border-soft); font-size: .9rem; }

/* -----------------------------------------------
   주사위·동전 — /tool/dice
----------------------------------------------- */
.tool-dice-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.tool-die {
  width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-bg);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700;
  box-shadow: var(--shadow);
}
.tool-die.coin { border-radius: 50%; font-size: 1rem; color: var(--primary); }

/* -----------------------------------------------
   룰렛 — /tool/roulette
----------------------------------------------- */
.tool-roulette-wrap { position: relative; width: 320px; max-width: 100%; margin: 16px auto; }
.tool-roulette-wrap canvas { width: 100%; height: auto; display: block; }
.tool-roulette-pointer {
  position: absolute; top: 50%; right: -6px; transform: translateY(-50%);
  width: 0; height: 0; border-top: 12px solid transparent; border-bottom: 12px solid transparent;
  border-right: 22px solid var(--primary); z-index: 2;
}

/* -----------------------------------------------
   그라데이션 텍스트 — /tool/gradient-text
----------------------------------------------- */
.tool-gradtext-stage { display: flex; align-items: center; justify-content: center; padding: 30px 16px; margin: 14px 0; background: var(--bg); border-radius: var(--radius); overflow: hidden; }
.tool-gradtext-stage span { line-height: 1.2; word-break: break-word; text-align: center; }

/* -----------------------------------------------
   이메일 서명 — /tool/email-signature
----------------------------------------------- */
.tool-sig-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: #fff; overflow: auto; }

/* -----------------------------------------------
   메모·할일 — /tool/memo
----------------------------------------------- */
.tool-todo-list { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.tool-todo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); }
.tool-todo label { display: flex; align-items: center; gap: 9px; cursor: pointer; flex: 1; }
.tool-todo.done span { text-decoration: line-through; color: var(--muted); }
.tool-todo-del { border: none; background: none; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.tool-todo-del:hover { color: #b91c1c; }

/* -----------------------------------------------
   사다리타기 — /tool/ladder
----------------------------------------------- */
.tool-ladder-wrap { overflow-x: auto; margin: 14px 0; }
.tool-ladder-wrap canvas { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); }

/* -----------------------------------------------
   클립패스 — /tool/clip-path
----------------------------------------------- */
.tool-clip-stage { display: flex; align-items: center; justify-content: center; padding: 30px; margin: 14px 0; background: var(--bg); border-radius: var(--radius); }
.tool-clip-box { width: 160px; height: 160px; background: var(--grad); }
#cp-presets { flex-wrap: wrap; }

/* -----------------------------------------------
   만년 달력 — /tool/calendar
----------------------------------------------- */
.tool-cal-head { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 10px; }
.tool-cal-head strong { min-width: 130px; text-align: center; font-size: 1.05rem; }
.tool-cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tool-cal th, .tool-cal td { border: 1px solid var(--border-soft); height: 52px; text-align: center; vertical-align: middle; }
.tool-cal th { background: var(--bg); font-size: .85rem; padding: 6px 0; height: auto; }
.tool-cal th.sun, .tool-cal td.sun { color: #dc2626; }
.tool-cal th.sat, .tool-cal td.sat { color: #2563eb; }
.tool-cal td span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-size: .92rem; }
.tool-cal td.today span { background: var(--primary); color: #fff; font-weight: 700; }

/* -----------------------------------------------
   ASCII 아트 — /tool/ascii-art
----------------------------------------------- */
.tool-ascii-out {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 6px; line-height: 6px;
  white-space: pre; overflow: auto; background: #fff; color: #111;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-top: 12px; letter-spacing: 0;
}

/* -----------------------------------------------
   QR 스캐너 — /tool/qr-scanner
----------------------------------------------- */
.tool-scanner-stage { margin: 14px 0; text-align: center; }
.tool-scanner-stage video { max-width: 100%; width: 340px; border-radius: var(--radius); background: #000; }

/* -----------------------------------------------
   cubic-bezier — /tool/bezier
----------------------------------------------- */
.tool-bezier-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.tool-bezier-wrap canvas { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); touch-action: none; cursor: grab; }
.tool-bezier-demo { flex: 1; min-width: 160px; height: 26px; background: var(--bg); border-radius: 20px; padding: 3px; }
.tool-bezier-ball { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); transform: translateX(0); }
#bz-presets { flex-wrap: wrap; }

/* -----------------------------------------------
   CSS 그리드/플렉스 생성기 — /tool/css-grid, /tool/flexbox
----------------------------------------------- */
.tool-grid-preview, .tool-flex-preview { margin: 14px 0; padding: 12px; background: var(--bg); border-radius: var(--radius); min-height: 80px; }
.tool-grid-cell {
  display: flex; align-items: center; justify-content: center; min-width: 38px;
  background: var(--grad); color: #fff; font-weight: 700; font-size: .9rem; border-radius: 8px; padding: 6px;
}
