/* auto/style.css — 오토 마우스 배포 페이지
   실행 파일을 받아 가는 페이지라 '믿을 만해 보이는 것'이 디자인 목표다.
   어두운 게임 테마 대신 밝고 담백하게 두고, 경고 안내만 눈에 띄게 색을 준다. */

:root {
    --bg:       #f5f7fb;
    --card:     #ffffff;
    --line:     #e3e8f0;
    --text:     #1e2536;
    --dim:      #667085;
    --accent:   #4f6ef2;
    --accent-d: #3a56d4;
    --warn-bg:  #fff8e8;
    --warn-line:#f0d79a;
    --warn-tx:  #7a5a10;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0 0 90px;
    background: var(--bg);
    color: var(--text);
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    line-height: 1.72;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 14px; }

/* ── 머리 ── */
.header { text-align: center; padding: 26px 14px 8px; }
.header h1 { margin: 0; font-size: 1.6rem; letter-spacing: -0.5px; }
.header .sub { color: var(--dim); font-size: .88rem; margin-top: 5px; }

.adbox { margin: 16px 0; text-align: center; min-height: 50px; }

/* ── 다운로드 ── */
.dl-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(30, 37, 54, .05);
    text-align: center;
}

.dl-btn {
    display: inline-flex; flex-direction: column; align-items: center;
    gap: 2px;
    min-width: 260px;
    padding: 16px 34px;
    background: var(--accent);
    color: #fff !important;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(79, 110, 242, .28);
    transition: background .15s, transform .1s;
}
.dl-btn:hover { background: var(--accent-d); transform: translateY(-1px); }
.dl-main { font-size: 1.12rem; font-weight: 800; }
.dl-sub  { font-size: .78rem; opacity: .9; font-weight: 500; }

.dl-meta {
    list-style: none;
    margin: 18px auto 0;
    padding: 0;
    max-width: 420px;
    text-align: left;
    font-size: .84rem;
}
.dl-meta li {
    display: flex; gap: 10px;
    padding: 6px 0;
    border-top: 1px solid var(--line);
}
.dl-meta li:first-child { border-top: none; }
.dl-meta b { flex: 0 0 92px; color: var(--dim); font-weight: 600; }
.muted { color: var(--dim); font-size: .92em; }

.empty { color: var(--dim); font-size: .9rem; margin: 0; }

/* ── 카드 ── */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    margin: 16px 0;
}
.card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.card p { font-size: .89rem; margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.lead { font-size: .95rem !important; }

/* 경고 안내 — 유일하게 색을 쓰는 블록이다 */
.card.warn {
    background: var(--warn-bg);
    border-color: var(--warn-line);
    color: var(--warn-tx);
}
.card.warn h2 { color: #6b4c08; }
.card.warn b { color: #5a3f05; }
.card.warn .muted { color: #8a6b25; }

.hash {
    margin: 14px 0 10px;
    font-size: .74rem;
    background: rgba(255,255,255,.6);
    border: 1px solid var(--warn-line);
    border-radius: 8px;
    padding: 10px 12px;
}
.hash dt { font-weight: 700; margin-top: 6px; }
.hash dt:first-child { margin-top: 0; }
.hash dd {
    margin: 2px 0 0;
    font-family: Consolas, monospace;
    word-break: break-all;
    line-height: 1.5;
}
code {
    background: rgba(255,255,255,.7);
    border: 1px solid var(--warn-line);
    border-radius: 5px;
    padding: 1px 5px;
    font-family: Consolas, monospace;
    font-size: .92em;
}

/* ── 목록 ── */
.steps { margin: 0; padding-left: 22px; font-size: .89rem; }
.steps li { margin: 8px 0; }
.rules { margin: 0; padding-left: 20px; font-size: .89rem; }
.rules li { margin: 8px 0; }

/* ── 기능 표 ── */
.tw { overflow-x: auto; }
.ft { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ft th, .ft td { padding: 9px 10px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.ft tr:first-child th, .ft tr:first-child td { border-top: none; }
.ft th { width: 128px; font-weight: 600; color: var(--dim); white-space: nowrap; }

/* 간격 추천 표 (머리행이 있는 4열 표) */
.pt thead th { color: var(--text); font-size: .8rem; background: #f2f5fb; white-space: nowrap; }
.pt th { width: auto; white-space: normal; min-width: 96px; }
.pt tbody tr:first-child th, .pt tbody tr:first-child td { border-top: 1px solid var(--line); }
.pt .nw { white-space: nowrap; }

/* ── FAQ ── */
.card details { border-top: 1px solid var(--line); padding: 9px 0; }
.card details:first-of-type { border-top: none; }
.card summary { cursor: pointer; font-size: .89rem; font-weight: 600; }
.card details p { margin: 9px 0 2px; color: var(--dim); font-size: .85rem; }

/* ── 링크 ── */
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
    background: #f2f5fb; border: 1px solid var(--line);
    border-radius: 9px; padding: 8px 13px;
    font-size: .85rem; text-decoration: none; color: var(--text);
}
.links a:hover { border-color: var(--accent); color: var(--accent); }

/* 함께 쓰면 좋은 도구 — 이름 + 한 줄 설명 */
.links.rel { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.links.rel a { display: flex; flex-direction: column; gap: 2px; }
.links.rel a span { font-size: .76rem; color: var(--dim); }

.src { font-size: .76rem; color: var(--dim); line-height: 1.7; padding: 0 4px; }

@media (max-width: 520px) {
    .header h1 { font-size: 1.38rem; }
    .dl-btn { min-width: 0; width: 100%; padding: 15px 20px; }
    .dl-meta b { flex-basis: 80px; }
    .ft th { width: 96px; }
    .card { padding: 15px 16px; }
}

.hash dd{word-break:break-all;overflow-wrap:anywhere}

/* ── 2026-10 추가: 짝 프로그램 카드 · 비교 표 · 처음 실행 안내 · 변경 내역 ── */
kbd {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 6px;
    border: 1px solid #c9d1de;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    font-family: Consolas, 'Malgun Gothic', monospace;
    font-size: .86em;
    line-height: 1.6;
    text-align: center;
    color: var(--text);
}
.pair {
    display: flex; align-items: center; gap: 14px;
    background: #eef2ff;
    border: 1px solid #c9d4fb;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--text) !important;
}
.pair:hover { border-color: var(--accent); }
.pair .pi { font-size: 2rem; line-height: 1; }
.pair b { display: block; font-size: .98rem; color: var(--accent-d); }
.pair span { font-size: .82rem; color: var(--dim); }

/* 어떤 걸 쓰면 되나 — 비교 표 (지금 페이지 열은 강조) */
.cmp thead th { color: var(--text); font-size: .82rem; background: #f2f5fb; white-space: nowrap; }
.cmp thead th a { text-decoration: none; }
.cmp th { width: 84px; }
.cmp td { min-width: 120px; }
.cmp .cur { background: #eef2ff; }
.cmp thead th.cur { background: #dfe6ff; color: var(--accent-d); }
.cmp tbody tr:first-child th, .cmp tbody tr:first-child td { border-top: 1px solid var(--line); }

/* 처음 실행할 때 알아둘 것 · 즉시 멈추기 */
.notice {
    background: #eef6ff;
    border: 1px solid #bcd6f5;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: .88rem;
    margin: 12px 0 0;
}
.notice b { color: #1d4f91; }
.stop { border-color: #f3c4c4; background: #fff6f6; }
.stop h2 { color: #8f1d1d; }

/* 버전 · 변경 내역 */
.ver { list-style: none; margin: 0; padding: 0; font-size: .87rem; }
.ver > li { border-top: 1px solid var(--line); padding: 10px 0; }
.ver > li:first-child { border-top: none; padding-top: 0; }
.ver .vh { font-weight: 700; }
.ver .vh small { font-weight: 400; color: var(--dim); margin-left: 6px; }
.ver ul { margin: 6px 0 0; padding-left: 20px; }
.ver li li { margin: 3px 0; }
.ver .now { display: inline-block; font-size: .72rem; font-weight: 700; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 8px; margin-left: 6px; vertical-align: 1px; }
.req { margin: 0; padding-left: 20px; font-size: .88rem; }
.req li { margin: 6px 0; }

/* 다운로드 정보 줄: 값이 길어도 이름 칸 옆에서 자연스럽게 줄바꿈되게 (flex 대신 float) */
.dl-meta li { display: block; padding-left: 102px; }
.dl-meta li::after { content: ""; display: block; clear: both; }
.dl-meta b { float: left; width: 92px; margin-left: -102px; }
@media (max-width: 520px) {
    .dl-meta li { padding-left: 88px; }
    .dl-meta b { width: 80px; margin-left: -88px; }
    /* 비교 표: 좁은 화면에서는 항목 이름을 한 줄 위로 올리고 프로그램 열을 나란히 */
    .cmp, .cmp thead, .cmp tbody { display: block; }
    .cmp tr { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
    .cmp thead th:first-child { display: none; }
    .cmp thead th { width: auto; white-space: normal; font-size: .78rem; padding: 8px 6px; }
    .cmp tbody th { grid-column: 1 / -1; width: auto; background: #f8fafc; padding: 6px 8px; font-size: .78rem; }
    .cmp td { min-width: 0; padding: 8px 6px; font-size: .8rem; border-top: none; }
}

/* ── 2026-10 다크 모드: 시스템 설정이 어두우면 같은 구성으로 어둡게 (경고·정지 카드 색은 유지하되 낮춤) ── */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #0f131b; --card: #171c26; --line: #2a3242; --text: #e4e8f0; --dim: #9aa5b8;
        --accent: #7b93ff; --accent-d: #a3b4ff;
        --warn-bg: #241e0c; --warn-line: #6b5518; --warn-tx: #f0d79a;
    }
    .dl-btn { background: #4f6ef2; box-shadow: none; }
    .dl-btn:hover { background: #3a56d4; }
    .card.warn h2, .card.warn b { color: #ffe3a3; }
    .card.warn .muted { color: #cdb27a; }
    .hash, code { background: rgba(0,0,0,.25); }
    kbd { background: #222937; border-color: #414b5e; }
    .pt thead th, .cmp thead th, .links a { background: #1e2533; }
    .links a { color: var(--text); }
    .pair, .cmp .cur { background: #1b2140; border-color: #34407a; }
    .cmp thead th.cur { background: #252d55; }
    .notice { background: #12213a; border-color: #2d4a75; }
    .notice b { color: #a9c8f5; }
    .stop { background: #2a1416; border-color: #6b2b2b; }
    .stop h2 { color: #ffb4b4; }
    .ver .now { color: #0f131b; }
}
@media (prefers-color-scheme: dark) and (max-width: 520px) {
    .cmp tbody th { background: #1e2533; }
}

/* 받은 뒤 3단계 (다운로드 카드 안) */
.qs { list-style: none; counter-reset: qs; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 0; padding: 0; font-size: .8rem; text-align: left; }
.qs li { counter-increment: qs; position: relative; padding-left: 36px !important; flex: 1 1 200px; max-width: 240px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--dim); }
.qs li::before { content: counter(qs); position: absolute; left: 9px; top: 9px; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: .74rem; }
.qs b { color: var(--text); display: block; }
@media (max-width: 520px) { .qs li { max-width: none; } }

/* ── 2026-11 작동 확인 상자 · 클릭 간격 계산기 ── */
.pad { user-select: none; -webkit-user-select: none; touch-action: manipulation; cursor: crosshair; text-align: center;
       border: 2px dashed #b9c6f6; background: #f3f6ff; border-radius: 14px; padding: 18px 12px 12px; margin: 4px 0 8px; }
.pad.live { border-style: solid; border-color: var(--accent); background: #e8eeff; }
.pad .pn { font-size: 1rem; color: var(--dim); }
.pad .pn b { font-size: 2.2rem; color: var(--text); font-variant-numeric: tabular-nums; margin-right: 2px; }
.pad .ps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: .86rem; color: var(--dim); margin-top: 4px; }
.pad .ps b { color: var(--text); font-variant-numeric: tabular-nums; }
.pad small { display: block; margin-top: 8px; font-size: .74rem; color: var(--dim); }
.padrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sbtn2 { font: inherit; font-size: .82rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.h3 { font-size: .96rem; margin: 18px 0 8px; }
.calc { display: grid; gap: 8px; font-size: .88rem; }
.calc label { display: inline-flex; align-items: center; gap: 6px; }
.calc .ck { gap: 5px; }
.calc input[type=number] { width: 92px; font: inherit; font-size: 1rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); }
.calc .iw { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.calc .cr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.calc .cr > span:first-child { min-width: 72px; color: var(--dim); }
.calc .arrow { color: var(--dim); }
.calc .cr b { color: var(--accent-d); }
@media (prefers-color-scheme: dark) {
    .pad { background: #141a2e; border-color: #34407a; }
    .pad.live { background: #1b2140; border-color: var(--accent); }
}
