body[data-tool="pixelate_image"] {
  --px-paper: #F3F1EC; --px-card: #FFFFFF; --px-ink: #141414; --px-ink2: #4B4A47; --px-mute: #8A8780; --px-line: #DEDAD2;
  --px-stage: #17191C; --px-stage2: #202328; --px-sig: #FF5A1F; --px-sig2: #E14810; --px-ok: #1F9D61;
  --px-disp: "Space Grotesk", "Pretendard Variable", Pretendard, "Helvetica Neue", Arial, sans-serif; --px-sans: Inter, "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", sans-serif; --px-mono: "JetBrains Mono", ui-monospace, Menlo, "Pretendard Variable", Pretendard, monospace;
  background: var(--px-paper); color: var(--px-ink); font-family: var(--px-sans);
}
body[data-tool="pixelate_image"] .dt-nav { background: var(--px-paper); border-bottom: 1px solid var(--px-line); }
body[data-tool="pixelate_image"] .dt-nav .navbar-brand { color: var(--px-ink); }
.dt-bare { display: block; width: 100%; flex: 1; }
.pxx { max-width: 1180px; margin: 0 auto; padding: 30px 20px 64px; }
.px-hero { display: flex; align-items: center; gap: 18px; }
.px-mosaic { flex: none; display: grid; grid-template-columns: repeat(3, 16px); gap: 3px; }
.px-mosaic i { width: 16px; height: 16px; border-radius: 3px; background: var(--px-ink); }
.px-mosaic i:nth-child(2), .px-mosaic i:nth-child(6), .px-mosaic i:nth-child(7) { background: var(--px-sig); }
.px-mosaic i:nth-child(4), .px-mosaic i:nth-child(9) { background: #B9B4AA; }
.px-mosaic i:nth-child(5) { background: #6E6A63; }
.px-hero h1 { margin: 0; font-family: var(--px-disp); font-weight: 700; font-size: 52px; line-height: 1; letter-spacing: -.02em; }
.px-hero p { margin: 8px 0 0; font-size: 17px; color: var(--px-ink2); }

.px-tool { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 312px; background: var(--px-card); border: 1px solid var(--px-line); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 40px rgba(20, 20, 20, .08); }
.px-stagewrap { display: flex; flex-direction: column; min-width: 0; background: var(--px-stage); }
.px-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 22px; min-height: 360px;
  background-color: var(--px-stage); background-image: linear-gradient(45deg, var(--px-stage2) 25%, transparent 25%, transparent 75%, var(--px-stage2) 75%), linear-gradient(45deg, var(--px-stage2) 25%, transparent 25%, transparent 75%, var(--px-stage2) 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.px-frame { position: relative; width: min(100%, calc(66vh * 1.5)); max-width: 100%; line-height: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.px-sample, .px-canvas { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.px-canvas[hidden], .px-sample[hidden] { display: none; }
.px-ov { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.px-ov.is-off { cursor: default; pointer-events: none; }
.px-rg { position: absolute; box-sizing: border-box; border: 2px dashed rgba(255, 255, 255, .95); outline: 1px solid rgba(0, 0, 0, .55); cursor: move; }
.px-rg-ellipse { border-radius: 50%; outline: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.px-rg.on { border: 2px solid var(--px-sig); outline: 1px solid rgba(255, 255, 255, .7); }
.px-rg-ellipse.on { outline: 1px dashed var(--px-sig); outline-offset: 0; }
.px-rg .h { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--px-sig); border-radius: 3px; box-sizing: border-box; }
.px-rg .h[data-h="nw"] { left: -8px; top: -8px; cursor: nwse-resize; }
.px-rg .h[data-h="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.px-rg .h[data-h="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.px-rg .h[data-h="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.px-rg .x { position: absolute; left: 50%; top: -13px; margin-left: -12px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: var(--px-sig); color: #fff; font: 700 16px/24px var(--px-sans); cursor: pointer; }
.px-drop { position: absolute; inset: 10px; display: flex; align-items: center; justify-content: center; border: 3px dashed var(--px-sig); border-radius: 14px; background: rgba(23, 25, 28, .82); color: #fff; font-family: var(--px-disp); font-size: 26px; pointer-events: none; }
.px-drop[hidden] { display: none; }
.px-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #2B2E33; color: #B6B2AA; font-size: 13px; flex-wrap: wrap; }
.px-meta { font-family: var(--px-mono); font-size: 12.5px; color: #E6E2DA; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.px-hint { margin-left: auto; color: #8C8880; }

.px-panel { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--px-line); }
.px-group { display: flex; flex-direction: column; gap: 7px; }
.px-group[hidden] { display: none; }
.px-lab { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--px-mute); }
.px-lab output { font-family: var(--px-mono); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--px-ink); font-weight: 500; }
.px-seg { display: flex; padding: 3px; background: #EFECE6; border-radius: 10px; gap: 3px; }
.px-seg button { flex: 1; min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--px-ink2); font: 600 13.5px var(--px-sans); cursor: pointer; }
.px-seg button[aria-pressed="true"] { background: var(--px-card); color: var(--px-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.px-fx { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.px-fx button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 4px 9px; border: 1.5px solid var(--px-line); border-radius: 12px; background: var(--px-card); color: var(--px-ink2); font: 600 13px var(--px-sans); cursor: pointer; }
.px-fx button[aria-pressed="true"] { border-color: var(--px-ink); color: var(--px-ink); box-shadow: inset 0 0 0 1px var(--px-ink); }
.sw { display: block; width: 46px; height: 32px; border-radius: 6px; }
.sw-px { background: conic-gradient(#C9814F 25%, #6E4A33 0 50%, #E3B48F 0 75%, #A86A45 0) 0 0 / 16px 16px; }
.sw-bl { background: radial-gradient(circle at 50% 50%, #C9814F 0, #E3B48F 30%, #EADBCB 62%, #EFE7DE 100%); filter: blur(1px); }
.sw-bar { background: linear-gradient(#EFE7DE 0 30%, #141414 30% 70%, #EFE7DE 70%); }
.px-group input[type="range"] { width: 100%; accent-color: var(--px-sig); height: 28px; margin: 0; }
.px-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.px-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border: 1.5px solid var(--px-line); border-radius: 10px; background: var(--px-card); color: var(--px-ink); font: 600 13.5px var(--px-sans); cursor: pointer; text-decoration: none; white-space: nowrap; }
.px-btn:hover:not(:disabled) { border-color: var(--px-ink); }
.px-btn:disabled { color: #B5B1A9; cursor: default; }
.px-btn-ink { background: var(--px-sig); border-color: var(--px-sig); color: #fff; }
.px-btn-ink:hover { background: var(--px-sig2); border-color: var(--px-sig2); }
.px-out { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--px-line); display: flex; flex-direction: column; gap: 10px; }
.px-btn-go { min-height: 48px; background: var(--px-ink); border-color: var(--px-ink); color: #fff; font-size: 15px; }
.px-btn-go:hover:not(:disabled) { background: #000; }
.px-btn-go:disabled { color: #ddd; }
.px-dim { text-align: center; font-family: var(--px-mono); font-size: 12px; color: var(--px-mute); }

.px-adwrap { margin: 28px auto 0; max-width: 970px; }
.px-article, .px-faq, .px-more { max-width: 760px; margin: 0 auto; }
.px-article { margin-top: 40px; font-size: 17px; line-height: 1.7; color: #23221F; }
.px-article h2, .px-faq h2, .px-more h2 { font-family: var(--px-disp); font-size: 28px; line-height: 1.2; letter-spacing: -.01em; margin: 46px 0 12px; color: var(--px-ink); }
.px-article h2:first-child { margin-top: 0; }
.px-article p { margin: 0 0 14px; }
.px-article ol, .px-article ul { margin: 0 0 14px; padding-left: 24px; }
.px-article li { margin: 0 0 8px; }
.px-article a { color: var(--px-sig2); }
.px-tbl { overflow-x: auto; margin: 6px 0 16px; border: 1px solid var(--px-line); border-radius: 12px; background: var(--px-card); }
.px-tbl table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.px-tbl th, .px-tbl td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid #ECE8E1; }
.px-tbl th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--px-mute); background: #FAF9F6; }
.px-tbl tr:last-child td { border-bottom: 0; }
.px-tbl td:first-child { font-weight: 700; white-space: nowrap; }
.px-faq { margin-top: 10px; }
.px-q { border-bottom: 1px solid var(--px-line); }
.px-q summary { padding: 16px 30px 16px 0; font-weight: 600; font-size: 17px; cursor: pointer; list-style: none; position: relative; }
.px-q summary::-webkit-details-marker { display: none; }
.px-q summary::after { content: "+"; position: absolute; right: 4px; top: 13px; font: 500 22px var(--px-mono); color: var(--px-mute); }
.px-q[open] summary::after { content: "–"; }
.px-q p { margin: 0 0 16px; font-size: 16px; line-height: 1.65; color: var(--px-ink2); }
.px-more div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.px-more a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--px-line); border-radius: 12px; background: var(--px-card); color: var(--px-ink); text-decoration: none; }
.px-more a:hover { border-color: var(--px-ink); }
.px-more b { font-size: 16px; }
.px-more span { font-size: 14px; color: var(--px-ink2); }

@media (pointer: coarse) { .px-rg .h { width: 22px; height: 22px; } .px-rg .h[data-h="nw"] { left: -12px; top: -12px; } .px-rg .h[data-h="ne"] { right: -12px; top: -12px; } .px-rg .h[data-h="sw"] { left: -12px; bottom: -12px; } .px-rg .h[data-h="se"] { right: -12px; bottom: -12px; } .px-rg .x { width: 30px; height: 30px; line-height: 30px; top: -16px; margin-left: -15px; } }
@media (max-width: 900px) {
  .px-tool { grid-template-columns: minmax(0, 1fr); }
  .px-panel { border-left: 0; border-top: 1px solid var(--px-line); }
  .px-out { margin-top: 0; }
}
@media (max-width: 600px) {
  .pxx { padding: 20px 14px 48px; }
  .px-hero { gap: 12px; align-items: flex-start; }
  .px-mosaic { grid-template-columns: repeat(3, 10px); gap: 2px; margin-top: 6px; }
  .px-mosaic i { width: 10px; height: 10px; border-radius: 2px; }
  .px-hero h1 { font-size: 36px; }
  .px-hero p { font-size: 15px; }
  .px-tool { border-radius: 14px; margin-top: 18px; }
  .px-stage { padding: 14px 10px; min-height: 0; }
  .px-hint { display: none; }
  .px-meta { max-width: 100%; }
  .px-panel { padding: 16px 14px 18px; gap: 14px; }
  .px-article { font-size: 16px; }
  .px-article h2, .px-faq h2, .px-more h2 { font-size: 24px; margin-top: 38px; }
  .px-more div { grid-template-columns: minmax(0, 1fr); }
}
html[lang="ko"] body[data-tool="pixelate_image"] { word-break: keep-all; overflow-wrap: anywhere; }
