/* AlphaTimer · AlphaConverter 공통 스타일.
   평면 디자인: 흰 바탕, 1px 테두리, 강조색은 파랑 하나. 그라데이션은 로고 그림에만 있다.
   변환기는 도구 묶음마다 색이 하나씩 있고(--tool), 파일 넣는 곳과 메뉴의 작은 네모(.tile)가 그 색을 쓴다. */

@font-face { font-family: Outfit; src: url(/assets/fonts/outfit-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Outfit; src: url(/assets/fonts/outfit-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #fff; --band: #f4f5f7; --ink: #1b1f27; --ink-2: #596070; --line: #dfe2e8;
  --brand: #2f5bea; --brand-2: #2347c2; --on-brand: #fff; --alert: #cf222e; --ok: #1a7f4e;
  --tool: var(--brand);
  /* Outfit은 로고 글자와 타이머 숫자에만 쓴다. 나머지는 본문 글꼴 하나로 통일 */
  --display: Outfit, "Pretendard Variable", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --body: "Pretendard Variable", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  color-scheme: light dark;
}
/* 어두운 화면: 기기 설정을 따르고, 머리말의 버튼으로 고르면 그것을 따른다(data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111318; --band: #1a1d24; --ink: #eceef2; --ink-2: #a2a9b7; --line: #2c313b;
    --brand: #7d9bff; --brand-2: #9db3ff; --on-brand: #0d1120; --alert: #ff7b85; --ok: #56d39b;
  }
}
:root[data-theme="dark"] {
  --bg: #111318; --band: #1a1d24; --ink: #eceef2; --ink-2: #a2a9b7; --line: #2c313b;
  --brand: #7d9bff; --brand-2: #9db3ff; --on-brand: #0d1120; --alert: #ff7b85; --ok: #56d39b;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
/* 도구 묶음의 색. 어두운 화면에서도 같은 색을 쓴다(위에 놓이는 글자는 항상 흰색) */
.g-all { --tool: #2f5bea; }
.g-image { --tool: #c2500a; }
.g-doc { --tool: #2f5bea; }
.g-pdf { --tool: #d6303c; }
.g-av { --tool: #b4530a; }
.g-calc { --tool: #12805c; }
.g-dev { --tool: #6a46d9; }
.g-text { --tool: #0b7a86; }
.g-pick { --tool: #c2410c; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); overflow-wrap: break-word; font: 16px/1.65 var(--body); }
:lang(ko) { word-break: keep-all; } /* 한국어만 어절 단위로 줄바꿈. 일본어·중국어에 걸면 줄이 안 꺾인다 */
a { color: var(--brand-2); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 40; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.skip:focus { top: 12px; }
.suggest { display: block; padding: 9px 16px; text-align: center; font-weight: 600; text-decoration: none; background: var(--brand); color: var(--on-brand); }

/* 머리말 */
.top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: var(--bg); }
[id] { scroll-margin-top: 76px; } /* 바로 가기(#)로 간 제목이 고정 메뉴에 가리지 않게 */
.top .wrap { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; min-height: 60px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 700 1.24rem/1 var(--display); letter-spacing: -.02em; }
.brand b { font-weight: 700; color: var(--brand); }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-size: .97rem; font-weight: 500; }
.top nav a, .menu summary { color: var(--ink-2); text-decoration: none; }
.top nav a:hover, .menu summary:hover { color: var(--ink); }
.top nav a[aria-current], .menu[open] summary, .menu summary[aria-current] { color: var(--ink); font-weight: 600; }

/* 펼침 메뉴. 묶음 메뉴는 누른 글자 바로 아래에, "모든 도구"는 머리말 아래에 가로로 길게 펼친다 */
.menu summary { cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; display: inline-block; width: .4em; height: .4em; margin: 0 0 .2em .45em;
  border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.menu[open] summary::after { transform: rotate(225deg); margin-bottom: -.05em; }
.menu.cat ul, .mega { position: absolute; z-index: 30; margin: 0; background: var(--bg); border: 1px solid var(--line);
  box-shadow: 0 18px 30px -20px rgb(0 0 0 / .35); }
.menu.cat { position: relative; }
.menu.cat ul { inset-inline-start: -14px; top: calc(100% + 12px); width: max-content; max-width: 280px; padding: 8px; list-style: none; border-radius: 10px; }
.mega { top: calc(100% + 1px); border-top: 0; border-radius: 0 0 12px 12px; }
.top nav .menu.cat a { display: block; padding: 8px 14px; border-radius: 7px; color: var(--ink); }

/* 로고 옆 "모든 도구": 묶음별로 모든 도구를 한 번에 보여 준다 */
.menu.all summary { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.menu.all summary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; }
.menu.all[open] summary { background: var(--band); }
.mega { left: 20px; right: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 6px 30px;
  padding: 22px 26px 16px; max-height: calc(100dvh - 76px); overflow: auto; }
.mega b { display: block; margin-bottom: 6px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.mega ul { margin: 0 0 12px; padding: 0; list-style: none; }
.top nav .mega a { display: flex; align-items: center; gap: 10px; margin: 0 -8px; padding: 5px 8px; border-radius: 7px; color: var(--ink); }
.top nav .menu a:hover, .top nav .menu a[aria-current] { background: var(--band); }
.tile { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 6px; color: #fff; background: var(--tool);
  font: 700 .56rem/1 var(--body); font-style: normal; letter-spacing: .02em; }
.tile svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 글 */
h1 { margin: 0; font-size: clamp(1.8rem, 4.4vw, 2.55rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
h2 { margin: 52px 0 12px; font-size: 1.45rem; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; text-wrap: balance; }
h3 { margin: 24px 0 4px; font-size: 1.06rem; font-weight: 600; line-height: 1.45; }
p, ul, ol { margin: 10px 0; text-wrap: pretty; }
.lead { margin: 10px auto 0; max-width: 36rem; font-size: 1.08rem; color: var(--ink-2); }
.hero { padding: clamp(28px, 5vw, 54px) 0 0; text-align: center; }
.prose { max-width: 720px; margin: 0 auto; }
.prose:has(.steps, .points) { max-width: 940px; }
.note, .msg, .tally { color: var(--ink-2); }
.note { font-size: .95rem; }

/* 도구 */
.tool { max-width: 820px; margin: 24px auto 0; text-align: center; }
.conv, .pitch { max-width: 940px; } /* 아래의 사용법·장점 묶음과 왼쪽 선을 맞춘다 */
.tool[data-app] { padding: clamp(18px, 4vw, 30px); border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.display { font: 600 clamp(3.2rem, 17vw, 9.5rem)/1.1 var(--display); letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
[data-app="stopwatch"] .display { font-size: clamp(2.5rem, 13vw, 7.5rem); }
.phase { margin: 0; font-weight: 600; color: var(--brand-2); }
[data-phase="short"] .phase, [data-phase="long"] .phase { color: var(--ink-2); }
.tally, .status { margin: 14px 0 0; }
.status { color: var(--alert); font-weight: 600; }
.status:empty, .msg:empty, .files:empty, .laps:empty { display: none; }

.inputs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin: 14px 0 22px; color: var(--ink-2); }
.inputs input, .inputs select, .files select {
  font: 500 1.02rem var(--body); min-height: 42px; padding: 7px 11px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
}
.inputs input:hover, .inputs select:hover, .files select:hover { border-color: var(--ink-2); }
.inputs input[type="number"] { width: 4.6rem; text-align: center; }
.inputs input[type="range"] { width: 9rem; padding: 0; border: 0; background: none; accent-color: var(--brand); vertical-align: middle; }
.inputs .maxw { width: 6.5rem; }
.inputs .ranges { width: 12rem; }
.inputs input[type="text"], .inputs input[type="password"] { width: 14rem; }

.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
button, .btn {
  min-height: 44px; padding: 9px 18px; cursor: pointer; font: 600 1rem var(--body); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); transition: background .15s, border-color .15s;
}
button:hover:not(:disabled), .btn:hover { background: var(--band); border-color: var(--ink-2); }
button:active:not(:disabled), .btn:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: default; }
button.toggle, button.go, a.btn { min-width: 9rem; color: var(--on-brand); border-color: var(--brand); background: var(--brand); }
button.toggle:hover:not(:disabled), button.go:hover:not(:disabled), a.btn:hover { border-color: var(--brand-2); background: var(--brand-2); }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.tool[data-state="done"] { animation: flash 1s steps(2, jump-none) infinite; }
.tool[data-state="done"] .display { color: var(--alert); }
@keyframes flash { to { background: color-mix(in srgb, var(--alert) 14%, var(--bg)); } }
.tool:fullscreen { display: flex; flex-direction: column; justify-content: center; max-width: none; margin: 0; border: 0; border-radius: 0; }
.tool:fullscreen .display { font-size: min(22vw, 45vh); }
.laps { max-width: 22rem; margin: 18px auto 0; padding-inline-start: 2.5rem; text-align: start; font-variant-numeric: tabular-nums; }

/* 변환기: 파일 넣는 곳. 그 도구 묶음의 색으로 칠한 넓은 판 */
.drop {
  position: relative; display: grid; justify-items: center; gap: 12px; padding: clamp(36px, 7vw, 66px) 18px; cursor: pointer;
  color: #fff; border-radius: 14px; background: var(--tool); outline: 2px dashed rgb(255 255 255 / .5); outline-offset: -12px; transition: filter .15s;
}
.drop:hover, .conv.over .drop { filter: brightness(1.07); }
.drop:focus-within, .conv.over .drop { outline-color: #fff; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop strong { padding: 13px 32px; border-radius: 8px; font-size: 1.08rem; font-weight: 600; color: #1b1f27; background: #fff; }
.drop span { color: rgb(255 255 255 / .94); }
.drop small { font-size: .78rem; font-weight: 500; letter-spacing: .04em; color: rgb(255 255 255 / .95); }
.conv.filled .drop { padding-block: 16px; outline-offset: -6px; }
.conv.filled .drop span, .conv.filled .drop small { display: none; }
/* 파일을 넣기 전에는 넣는 곳만 보인다 */
.conv:not(.filled) :is(.controls, .opts, .inputs, .note, .maker) { display: none; }

/* 변환기: 파일 목록 */
.files { list-style: none; margin: 14px 0 0; padding: 0 14px; text-align: start; border: 1px solid var(--line); border-radius: 12px; }
.files li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.ext { min-width: 3.2rem; padding: 4px 7px; border-radius: 5px; text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  color: var(--ink-2); background: var(--band); }
.files .name { flex: 1 1 9rem; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.files .info { color: var(--ink-2); font-size: .93rem; font-variant-numeric: tabular-nums; }
.files .pick { display: inline-flex; align-items: center; gap: 8px; }
.files .arrow { color: var(--ink-2); }
.files li > button:first-of-type { margin-inline-start: auto; }
.files select { min-height: 36px; padding: 4px 9px; font-weight: 600; }
.files a { font-weight: 600; }
.files button { min-height: 36px; padding: 4px 11px; }
.files textarea { flex: 1 0 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; resize: vertical;
  font: inherit; font-size: .95rem; line-height: 1.6; color: var(--ink); background: var(--band); }
.files .err, .msg.err { color: var(--alert); }
.opts { margin-top: 14px; }
.opts summary { display: inline-block; cursor: pointer; color: var(--ink-2); font-size: .95rem; list-style: none; }
.opts summary::-webkit-details-marker { display: none; }
.opts summary::after { content: ""; display: inline-block; width: .4em; height: .4em; margin: 0 0 .2em .5em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.opts[open] summary::after { transform: rotate(225deg); margin-bottom: 0; }
.opts .inputs { margin: 12px 0 4px; }
.conv .inputs { margin: 16px 0 0; }
.conv .controls { margin-top: 18px; }
.msg { margin: 14px 0 0; }

/* PDF 쪽 정리: 쪽마다 작은 그림 한 장 */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.thumbs:empty { display: none; }
.thumbs li { position: relative; display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--band); cursor: grab; }
.thumbs li.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.thumbs .page { display: grid; place-items: center; width: 100%; aspect-ratio: 1; min-height: 0; padding: 0; border: 0; background: none; }
.thumbs .page:hover:not(:disabled) { background: none; }
.thumbs img { max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; border: 1px solid var(--line); background: #fff; }
.thumbs .no { position: absolute; left: 12px; top: 12px; min-width: 1.7em; padding: 1px 6px; border-radius: 5px; font-size: .78rem; font-weight: 700;
  color: #fff; background: rgb(27 31 39 / .78); }
.thumbs li.sel .no { background: var(--brand); }
.acts { display: flex; justify-content: center; gap: 4px; }
.acts button { min-height: 32px; min-width: 32px; padding: 2px 6px; font-size: .95rem; }
.conv .note { margin: 12px 0 0; }

/* PDF 서명: 서명 만드는 곳, 그리고 서명을 넣을 문서의 쪽들 */
.maker { margin: 14px 0 0; padding: 14px; text-align: start; border: 1px solid var(--line); border-radius: 12px; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.tabs button { min-height: 36px; padding: 5px 14px; }
.tabs button[aria-pressed="true"] { color: var(--bg); border-color: var(--ink); background: var(--ink); }
.inks { display: flex; gap: 8px; margin-inline-start: auto; }
.tabs .ink { width: 28px; min-height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--bg); outline: 1px solid var(--line); }
.tabs .ink[data-ink="#14181f"] { background: #14181f; }
.tabs .ink[data-ink="#1c3fc4"] { background: #1c3fc4; }
.tabs .ink[aria-pressed="true"] { outline: 2px solid var(--brand); }
.signname { width: 100%; min-height: 44px; padding: 8px 12px; font: 500 1.05rem var(--body); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 10px; }
.styles:empty { display: none; }
.style { display: grid; place-items: center; height: 76px; padding: 10px; background: #fff; }
.style:hover:not(:disabled) { background: #fff; border-color: var(--ink-2); }
.style[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.style img { max-width: 100%; max-height: 100%; min-height: 0; pointer-events: none; }
.style { cursor: grab; }
.pad { display: block; width: 100%; height: auto; border: 1px dashed var(--ink-2); border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }
.wipe { margin-top: 8px; }
.maker .note { margin: 0; }
.sheets { display: grid; gap: 14px; max-width: 780px; margin: 14px auto 0; }
.sheets:empty { display: none; }
.sheet { position: relative; border: 1px solid var(--line); cursor: copy; }
.sheet canvas { display: block; width: 100%; height: auto; }
.mark { position: absolute; outline: 1.5px dashed transparent; cursor: move; touch-action: none; }
.mark:hover, .mark.on { outline-color: var(--brand); }
.mark img { display: block; width: 100%; height: 100%; pointer-events: none; }
/* ✕와 크기 손잡이는 글자를 가리지 않게, 표식에 마우스를 올렸거나 눌러서 고른 동안에만 보인다 */
.mark .del { position: absolute; right: -1px; top: -22px; min-height: 22px; width: 22px; padding: 0; border-radius: 6px 6px 0 0; font-size: .7rem; line-height: 1; color: #fff; border: 0; background: var(--brand); }
.grip { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: var(--brand); cursor: nwse-resize; }
.tbox { position: absolute; display: none; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: none; cursor: text; }
.texting .tbox { display: block; outline: 1px dashed color-mix(in srgb, var(--brand) 55%, transparent); }
.texting .tbox:hover:not(:disabled) { background: color-mix(in srgb, var(--brand) 18%, transparent); transform: none; }
.tedit { position: absolute; z-index: 3; padding: 0 3px; font-family: sans-serif; color: #14181f; background: #fff; border: 1.5px solid var(--brand); border-radius: 2px; box-sizing: border-box; }
.mark .del, .mark .grip { opacity: 0; pointer-events: none; }
.mark:hover .del, .mark:hover .grip, .mark.on .del, .mark.on .grip { opacity: 1; pointer-events: auto; }

/* PDF 자르기: 첫 쪽 미리보기 위에서 남길 사각형을 끈다 */
.cropper { margin-top: 14px; text-align: center; }
.stage { position: relative; display: inline-block; max-width: 100%; overflow: hidden; border: 1px solid var(--line); line-height: 0; touch-action: none; }
.stage canvas { display: block; max-width: 100%; height: auto; max-height: 70vh; }
.crect { position: absolute; inset: 0; border: 2px solid var(--brand); box-shadow: 0 0 0 100vmax rgb(0 0 0 / .5); cursor: move; }
.hd { position: absolute; width: 16px; height: 16px; margin: -8px; border: 2px solid #fff; border-radius: 50%; background: var(--brand); }
.hd.tl { left: 0; top: 0; cursor: nwse-resize; } .hd.t { left: 50%; top: 0; cursor: ns-resize; } .hd.tr { left: 100%; top: 0; cursor: nesw-resize; }
.hd.r { left: 100%; top: 50%; cursor: ew-resize; } .hd.br { left: 100%; top: 100%; cursor: nwse-resize; } .hd.b { left: 50%; top: 100%; cursor: ns-resize; }
.hd.bl { left: 0; top: 100%; cursor: nesw-resize; } .hd.l { left: 0; top: 50%; cursor: ew-resize; }
.conv:not(.filled) .cropper { display: none; }

/* 도구 바로 아래: 한 줄 소개와 약속 세 가지 */
.pitch { margin: 22px auto 0; text-align: start; }
.pitch .lead { margin: 0 0 10px; max-width: none; color: var(--ink); }
.ticks { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); }
.ticks li { position: relative; padding-inline-start: 1.7em; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: .3em; top: .28em; width: .42em; height: .78em;
  border: solid var(--ok); border-width: 0 2.2px 2.2px 0; transform: rotate(40deg); }

/* 사용법: 왼쪽에 색 띠가 있는 판 안에 번호를 붙인 단계 */
.steps { margin: 60px 0 0; padding: 28px clamp(20px, 4vw, 40px) 30px; border-inline-start: 5px solid var(--brand); border-radius: 4px 12px 12px 4px; background: var(--band); }
[dir="rtl"] .steps { border-radius: 12px 4px 4px 12px; }
.steps h2 { margin: 0 0 18px; }
.steps ol { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; min-height: 30px; padding-top: 2px; padding-inline-start: 46px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; font-size: .9rem; font-weight: 700; color: var(--brand-2); background: color-mix(in srgb, var(--brand) 18%, var(--bg)); }

/* 장점 묶음: 아이콘 + 제목 + 설명을 두 칸으로 */
.points { margin: 64px 0 0; }
.points > h2 { margin: 0 0 30px; text-align: center; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 56px; }
.grid .wide { grid-column: 1 / -1; }
.grid h3 { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 6px; font-size: 1.08rem; }
.grid svg { flex: none; width: 24px; height: 24px; margin-top: .05em; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.grid p { margin: 0; color: var(--ink-2); }
.grid p + p { margin-top: 8px; }
.feat strong { display: block; }

/* 자주 쓰는 시간 같은 짧은 링크 묶음 */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px 0 8px; padding: 0; list-style: none; }
.chips a { display: block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--ink); }
.chips a:hover { border-color: var(--brand); color: var(--brand-2); }
.prose .chips { justify-content: flex-start; }
.chips a[aria-current] { color: var(--on-brand); border-color: var(--brand); background: var(--brand); }

/* 첫 화면: 제품을 큰 카드로 */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); /* 제품 넷: 2×2 */ gap: 20px; max-width: 1040px; margin: 34px auto 0; text-align: start; }
.product { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3.4vw, 34px); border: 1px solid var(--line); border-radius: 16px; }
.product .brand { font-size: 1.7rem; }
.product p { margin: 0; color: var(--ink-2); }
.picks { display: grid; gap: 2px; margin: 4px 0 6px; padding: 0; list-style: none; }
.picks a { display: flex; align-items: center; gap: 10px; margin: 0 -8px; padding: 6px 8px; border-radius: 7px; color: var(--ink); text-decoration: none; font-weight: 500; }
.picks a:hover { background: var(--band); }
.product .btn { margin-top: auto; align-self: flex-start; }

/* AlphaKit: 도구 목록과 도구 화면 */
.kgroup h2 { margin: 44px 0 14px; }
.picks.wide { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 6px 22px; }
.picks.wide a { align-items: flex-start; padding: 10px; }
.picks.wide span { display: grid; gap: 2px; }
.picks.wide small { color: var(--ink-2); font-size: .86rem; font-weight: 400; line-height: 1.45; }
.kit { max-width: 860px; padding: clamp(14px, 3vw, 24px); text-align: start; border: 1px solid var(--line); border-radius: 14px; border-top: 4px solid var(--tool); }
.kbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; } /* 칸이 내용(넓은 표)만큼 커지지 않게 */
.krow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; min-width: 0; margin: 0; } /* min-width: 격자 안에서 칸 내용만큼 넓어지지 않게(파이어폭스·아랍어에서 넘쳤다) */
.krow.top { align-items: flex-start; }
.krow > * { min-width: 0; }
.kf { display: grid; gap: 4px; color: var(--ink-2); font-size: .9rem; flex: 1 1 11rem; }
.kf > span:empty { display: none; }
.kf input, .kf select, .kf textarea, .kit .kout textarea, .kit > .kbody > label.kf textarea { width: 100%; font: 500 1rem var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.kf input[type="range"] { padding: 0; border: 0; }
.kf input::placeholder, .kf textarea::placeholder { color: var(--ink-2); opacity: .5; }
.kf textarea, .kout textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Pretendard Variable", monospace; font-size: .92rem; line-height: 1.55; resize: vertical; }
.kc { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--ink); }
.kout { position: relative; }
.kout .cp { position: absolute; inset-inline-end: 8px; top: 8px; min-height: 30px; padding: 2px 10px; font-size: .85rem; }
.big { margin: 0; font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.knote { margin: 0; color: var(--ink-2); font-size: .92rem; }
.knote.ok { color: var(--ok); } .knote.err { color: var(--alert); }
.stat { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.stat > span { color: var(--ink-2); } .stat b { text-align: end; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 26px; }
.card2 { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.card2 .krow { align-items: center; gap: 8px; } .card2 input { width: 6.5rem; font: 500 1rem var(--body); padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.agecard { display: grid; grid-template-columns: minmax(9rem, 12rem) 1fr; gap: 6px 18px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.agecard > div { display: grid; gap: 2px; } .agecard span { color: var(--ink-2); font-weight: 600; } .agecard small { color: var(--ink-2); }
@media (max-width: 560px) { .agecard { grid-template-columns: 1fr; } }
.kt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .94rem; }
.kt th, .kt td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: end; } .kt th:first-child, .kt td:first-child { text-align: start; font-weight: 600; }
.scroll { max-height: 22rem; overflow: auto; border: 1px solid var(--line); border-radius: 8px; } .scroll thead th { position: sticky; top: 0; background: var(--band); }
.hrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 7px 0; border-top: 1px solid var(--line); } .hrow code { overflow-wrap: anywhere; flex: 1 1 14rem; font-size: .88rem; }
.swatch { height: 90px; border-radius: 10px; border: 1px solid var(--line); }
.rx, .kbody pre { margin: 0; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 8px; background: var(--band); font: .9rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.rx mark { background: #ffe58a; color: #1b1f27; border-radius: 3px; }
.diff { font: .9rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px solid var(--line); border-radius: 8px; overflow: auto; } .diff:empty { display: none; }
.diff div { padding: 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; } .diff span { display: inline-block; width: 1.4em; color: var(--ink-2); }
.diff .add { background: color-mix(in srgb, var(--ok) 20%, var(--bg)); } .diff .del { background: color-mix(in srgb, var(--alert) 18%, var(--bg)); }
.related h2 { margin-bottom: 8px; text-align: start; font-size: 1.15rem; } .related .chips { justify-content: flex-start; }

/* 꼬리말 */
.foot { margin-top: 80px; padding: 26px 0 44px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; background: var(--band); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot span { margin-inline-start: auto; }
/* 머리말 오른쪽: 언어(지구본)와 화면 모드 */
.tools-r { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.lang { position: relative; }
.lang summary, .theme { display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: 500 .95rem var(--body); color: var(--ink-2); }
.lang summary:hover, .lang[open] summary, .theme:hover:not(:disabled) { color: var(--ink); background: var(--band); }
.lang summary::after { display: none; }
:is(.lang summary, .theme) svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top .lang .langs { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 30; display: grid; gap: 2px; width: max-content; min-width: 150px; max-height: min(70vh, 34rem); overflow-y: auto; padding: 6px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 30px -20px rgb(0 0 0 / .35); }
.top .lang .langs a { padding: 7px 14px; border-radius: 7px; color: var(--ink); }
.top .lang .langs a:hover, .top .lang .langs a[aria-current] { background: var(--band); }
.top .lang .langs a[aria-current] { font-weight: 600; }
.theme { min-width: 38px; justify-content: center; padding: 0; }
.theme .isun { display: none; }
:root[data-theme="dark"] .theme .isun { display: block; }
:root[data-theme="dark"] .theme .imoon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .isun { display: block; }
  :root:not([data-theme="light"]) .theme .imoon { display: none; }
}

@media (max-width: 760px) {
  .lang summary span { display: none; } /* 좁은 화면에서는 지구본만 */
  .menu.cat { display: none; } /* 좁은 화면에서는 "모든 도구" 하나로 충분하다 */
  .mega { left: 0; right: 0; border-inline: 0; border-radius: 0; padding: 18px 20px 12px; }
  .grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* 설명 아래 다른 제품 소개: 그림 카드 하나(방문마다 무작위), 링크 밑줄 없음 */
.promos { max-width: 720px; margin: 56px auto 0; }
.promo { display: none; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; background: #fff; transition: transform .15s, box-shadow .15s; }
.promo.on { display: block; }
.promo:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
.promo img { display: block; width: 100%; height: auto; }
.promo .pt { display: grid; gap: 6px; padding: 16px 20px 20px; color: var(--ink-2); background: var(--band); }
.promo .pt b { font-size: 1.1rem; color: var(--ink); }
.promo .pt em { justify-self: start; margin-top: 6px; padding: 8px 18px; border-radius: 999px; font-style: normal; font-weight: 600; color: var(--on-brand); background: var(--brand); }

/* 뽀모도로: 집중 음악(묶음 고르기와 작은 재생 줄) */
.music { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.mrow { display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--ink-2); }
.plpick { position: relative; }
.plpick summary { display: flex; align-items: center; min-height: 40px; padding: 6px 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.plpick summary:hover { border-color: var(--ink-2); }
/* 목록은 늘 버튼 바로 아래로 펼친다(기본 선택 상자는 고른 항목을 버튼 위에 겹쳐 띄워서 위치가 어색하다) */
.plpick ul { position: absolute; z-index: 20; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); width: max-content; min-width: 100%; max-height: 17rem; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none; text-align: start; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 30px -20px rgb(0 0 0 / .35); }
.plpick li button { display: block; width: 100%; min-height: 36px; padding: 6px 14px; font-weight: 500; text-align: start; border: 0; border-radius: 7px; background: none; }
.plpick li button:hover { background: var(--band); }
.plpick li button[aria-pressed="true"] { font-weight: 700; color: var(--brand-2); }
.mbar { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 4px; max-width: 100%; margin-top: 12px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 12px; }
.mbar button { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; padding: 0; border: 0; border-radius: 8px; background: none; }
.mbar svg { width: 18px; height: 18px; fill: currentColor; }
.mbar svg.line { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mplay { color: var(--brand-2); }
:is(.mplay, .mmute) :is(.ipause, .ioff), .mplay[aria-pressed="true"] .iplay, .mmute[aria-pressed="true"] .ion { display: none; }
.mplay[aria-pressed="true"] .ipause, .mmute[aria-pressed="true"] .ioff { display: block; }
.mtitle { min-width: 0; max-width: 14rem; margin: 0 10px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; color: var(--ink-2); }
.mvolbox { display: inline-flex; align-items: center; gap: 2px; }
.mvol { width: 6.5rem; accent-color: var(--brand); }
.mhint { margin: 8px 0 0; font-size: .88rem; }

/* AlphaGrade: 카드 그레이딩 예측 */
.grade { --tool: #1d2b4f; max-width: 980px; } /* 슬랩 케이스 같은 짙은 남색 */
:root[data-theme="dark"] .grade { --tool: #2a3d6b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grade { --tool: #2a3d6b; } }
.gslots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gslot { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 190px; padding: 18px 14px; text-align: center; }
.gslot b { font-size: 1.05rem; } .gslot b small { font-weight: 500; opacity: .8; }
.gslot img { max-height: 120px; max-width: 80%; border-radius: 6px; box-shadow: 0 6px 18px -8px rgb(0 0 0 / .45); }
.gslot.done strong, .gslot.done span { display: none; }
.gtabs { display: inline-flex; gap: 4px; margin: 18px 0 2px; padding: 4px; border-radius: 10px; background: var(--band); }
.gtabs button { min-height: 36px; border: 0; background: none; }
.gtabs button[aria-pressed="true"] { background: var(--bg); box-shadow: 0 1px 3px rgb(0 0 0 / .15); }
.gpanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 12px; text-align: start; }
.gpanes figure { margin: 0; }
.gpanes figcaption { margin-bottom: 6px; font-weight: 600; }
.gstage { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }
.gstage canvas { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--band); }
.gstage svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.gsrc polygon { fill: rgb(47 91 234 / .1); stroke: #2f5bea; stroke-width: 2; vector-effect: non-scaling-stroke; }
.gmarks circle { fill: none; stroke: #e5373b; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.gh { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 3px solid #fff; border-radius: 50%; background: #2f5bea; box-shadow: 0 0 0 1px rgb(0 0 0 / .35); cursor: grab; touch-action: none; }
.gl { position: absolute; touch-action: none; }
.gl.v { top: 0; bottom: 0; width: 20px; margin-left: -10px; cursor: ew-resize; }
.gl.h { left: 0; right: 0; height: 20px; margin-top: -10px; cursor: ns-resize; }
.gl::after { content: ""; position: absolute; border: 0 dashed #e5376b; }
.gl.v::after { left: 9px; top: 0; bottom: 0; border-left-width: 2px; }
.gl.h::after { top: 9px; left: 0; right: 0; border-top-width: 2px; }
.gl:focus-visible { outline: none; } .gl:focus-visible::after { border-color: #2f5bea; border-style: solid; }
.glive { position: absolute; left: 50%; bottom: 7%; display: grid; justify-items: center; gap: 2px; padding: 6px 12px; transform: translateX(-50%); border-radius: 8px; font: 600 .85rem var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; color: #fff; background: rgb(17 19 24 / .78); pointer-events: none; }
.glive:empty { display: none; }
.gzoom { display: inline-flex; align-items: center; gap: 6px; }
.gzoom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.gzoom[aria-pressed="true"] { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.grade.zooming .gstage { cursor: crosshair; }
.glimit { margin: 10px 0 0; font-weight: 600; color: var(--ink-2); }
.gstage .gloupe { position: absolute; z-index: 2; width: 150px; height: 150px; background: #000; margin: -190px 0 0 -75px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 8px 24px rgb(0 0 0 / .4); pointer-events: none; }
.greport { margin-top: 26px; text-align: start; }
.greport h2 { margin-top: 0; }
.gslabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; } /* 넷: 넓으면 한 줄, 폰은 2×2 */
/* 슬랩 라벨처럼: 위에 회사 이름 띠, 가운데 큰 숫자, 아래 등급 이름 */
.gslab { display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; overflow: hidden; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); }
.gslab header { justify-self: stretch; padding: 6px 12px; font: 700 .95rem var(--display); letter-spacing: .12em; text-align: center; color: #fff; }
.gslab.psa header { background: #c8102e; } .gslab.bgs header { background: #7a6a3a; } .gslab.cgc header { background: #0a6c8a; } .gslab.tag header { background: #4b4f5c; }
.gnum { padding: 10px 0 0; font: 700 3.4rem/1 var(--display); font-variant-numeric: tabular-nums; }
.glabel { padding: 4px 0 2px; font-weight: 600; color: var(--ink-2); }
.gslab .gsubs { padding: 0 0 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gslab:not(.bgs) .glabel { padding-bottom: 14px; }
.gslab.black { border-color: #111; background: #111; } .gslab.black header { background: #000; color: #d8b45a; }
.gslab.black .gnum, .gslab.black .glabel, .gslab.black .gsubs { color: #d8b45a; }
.greport h3 { margin: 26px 0 10px; }
.gothers { margin: -6px 0 0; font-weight: 600; } .gothers a { text-decoration: none; }
.gguide > summary { display: none; } /* 펼쳐져 있을 때(처음)는 그냥 안내로 보인다 */
.gguide:not([open]) > summary { display: block; margin: 44px 0 0; padding: 14px 18px; list-style: none; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; text-align: center; color: var(--ink-2); cursor: pointer; }
.gguide:not([open]) > summary::-webkit-details-marker { display: none; }
.gguide:not([open]) > summary::after { content: " ▾"; }
.gguide:not([open]) > summary:hover { color: var(--ink); background: var(--band); } .greport > .controls { margin-top: 20px; }
.gsubgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.gsub { display: grid; align-content: start; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.gsub > span { color: var(--ink-2); font-size: .9rem; }
.gsub > b { font: 700 1.6rem var(--display); }
.gsub small { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gsub select { width: 100%; min-height: 40px; padding: 6px 10px; font: 600 1rem var(--body); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.gstd { max-width: 640px; margin: 10px 0; } .gstd :is(th, td) { text-align: start; }
@media (max-width: 560px) { .gslots { grid-template-columns: 1fr 1fr; gap: 8px; } .gslot { min-height: 150px; padding: 12px 8px; } .gnum { font-size: 2.8rem; } }

/* 핀볼 뽑기: 게임 화면은 늘 어둡게(오락실 느낌). 순위판·자막은 캔버스에 그리고, 화면 아래에 도착 순서 전체, 가운데 아래에 당첨 */
.kit[data-kit="pinball"] { max-width: 1100px; }
.pbopts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.pbcount { color: var(--ink-2); font-weight: 500; }
.pbstage { position: relative; overflow: hidden; border-radius: 12px; background: #05060b; }
.pbstage:fullscreen { border-radius: 0; }
.pbcanvas { display: block; width: 100%; height: clamp(420px, 72vh, 820px); }
.pbstage:fullscreen .pbcanvas { height: 100vh; }
.pbside { margin-top: 10px; padding: 10px 14px; border-radius: 12px; color: #e6e9f2; background: #05060b; text-align: start; }
.pbtally { margin: 0 0 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pbboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 2px 16px; margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.pbboard[data-size="m"] { grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); font-size: .8rem; }
.pbboard[data-size="s"] { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); font-size: .7rem; }
.pbwin .pbteams { width: 100%; max-height: 34vh; overflow: auto; text-align: start; font-size: .9rem; }
.pbteams p { margin: 2px 0; } .pbwin .pbteams b { font: 800 1rem/1.4 var(--body); color: #facc15; }
.pbbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pbcustom { padding: 8px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.pbcustom summary { cursor: pointer; font-weight: 700; } .pbcustom[open] { display: grid; gap: 10px; padding-bottom: 12px; }
.controls .pbrec.on { color: #fff; background: #dc2626; border-color: #dc2626; }
.pbboard li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pbboard li b { color: #9aa3b5; font-weight: 600; }
.pbboard li.win { font-weight: 800; } .pbboard li.win::after { content: " ★"; color: #facc15; }
.pbwin { position: absolute; inset: auto 0 18px; display: grid; justify-items: center; gap: 4px; width: min(92%, 420px); margin: 0 auto; padding: 14px 18px; border: 2px solid #facc15; border-radius: 14px; color: #fff; background: rgb(5 6 11 / .88); text-align: center; }
.pbwin .pbpromo { margin-top: 4px; font-size: .9rem; color: #fbcfe8; }
.pbwin small { color: #facc15; font-weight: 700; letter-spacing: .08em; } .pbwin b { font: 800 1.6rem/1.2 var(--display); overflow-wrap: anywhere; } .pbwin button { margin-top: 6px; }
