/* ToolTong v2 — 시안 토큰 위에 도구 화면용 컴포넌트만 추가 */
:root{--red:#c2453a;--amber:#8a6320}

/* 폼 보조 */
.field-hint{font-size:11px;color:var(--muted);margin-top:6px;line-height:1.7}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field-row.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.field-group{margin-bottom:18px}
.field-group:last-child{margin-bottom:0}
.field:disabled,.field[readonly]{background:#f6f8fb;color:#68768d}
select.field{appearance:none;background-image:linear-gradient(45deg,transparent 50%,#7c8ba2 50%),linear-gradient(135deg,#7c8ba2 50%,transparent 50%);background-position:calc(100% - 18px) 21px,calc(100% - 13px) 21px;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:38px}
.input-suffix{display:flex;align-items:center;gap:8px}
.input-suffix>span{font-size:13px;color:var(--muted);white-space:nowrap}
.input-suffix .field{flex:1}
.check-row{display:flex;align-items:center;gap:9px;font-size:13px;min-height:32px}
.check-row input{width:17px;height:17px;accent-color:var(--blue)}

/* 선택 카드 (라디오) */
.choice-grid{display:grid;gap:8px}
.choice{display:flex;align-items:flex-start;gap:10px;border:1px solid #dfe5ee;border-radius:10px;padding:11px 13px;font-size:13px;cursor:pointer;background:#fff;line-height:1.55}
.choice:hover{border-color:#b9cbf2;background:#fbfcff}
.choice input{accent-color:var(--blue);margin-top:3px;flex-shrink:0}
.choice:has(input:checked){border-color:#9db9f7;background:var(--blue-soft);box-shadow:0 0 0 1px #9db9f7 inset}
.choice small{display:block;font-size:11px;color:var(--muted);font-weight:400;margin-top:2px}

/* 결과 */
.result-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.result-big{font-size:34px;font-weight:750;letter-spacing:-.045em;color:var(--blue);line-height:1.35;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.result-big small{font-size:14px;font-weight:600;margin-left:4px}
.result-sub{font-size:12px;color:var(--sub);line-height:1.8;margin-top:8px}
.result-sub b{color:var(--ink);font-weight:650}
.result-line{display:flex;justify-content:space-between;gap:14px;padding:9px 0;font-size:13px;border-bottom:1px dashed #e6eaf2}
.result-line:last-child{border:0}
.result-line span{color:var(--sub)}
.result-line b{font-weight:650;font-variant-numeric:tabular-nums;text-align:right}
.badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:650;border-radius:6px;padding:3px 8px;background:#eef3ff;color:#355fba}
.badge.ok{background:#eaf6f1;color:#23745f}
.badge.warn{background:#fff4e8;color:#8a6320}
.badge.no{background:#fdeeec;color:#a83e32}

/* 표 */
.table-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:11px}
.data-table{width:100%;border-collapse:collapse;font-size:12px;min-width:420px}
.data-table th,.data-table td{padding:9px 12px;text-align:right;border-bottom:1px solid #eef1f6;font-variant-numeric:tabular-nums;white-space:nowrap}
.data-table th{background:#f7f9fd;color:var(--sub);font-weight:650;font-size:11px;position:sticky;top:0}
.data-table th:first-child,.data-table td:first-child{text-align:left}
.data-table tr:last-child td{border-bottom:0}
.data-table td strong{font-weight:650}
.table-cap{font-size:11px;color:var(--muted);margin-top:9px;line-height:1.7}
.table-scroll.tall{max-height:340px;overflow-y:auto}

/* 리스트 (화장실·PDF·이미지) */
.result-list{display:flex;flex-direction:column;max-height:520px;overflow-y:auto;margin:-4px -4px 0}
.result-item{display:flex;gap:12px;padding:13px 4px;border-bottom:1px solid #eef1f6;text-align:left;background:none;width:100%}
.result-item:last-child{border-bottom:0}
.result-item:hover{background:#f8faff}
.result-item .rank{font-size:11px;font-weight:700;color:#7191c1;width:22px;flex-shrink:0;padding-top:3px}
.result-item .body{min-width:0;flex:1}
.result-item strong{font-size:13px;display:block;line-height:1.5}
.result-item p{font-size:11px;color:var(--sub);line-height:1.6;margin-top:3px;overflow-wrap:anywhere}
.result-item .meta{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.result-item .dist{font-size:11px;color:var(--blue);font-weight:650;white-space:nowrap;flex-shrink:0}
.result-item.selected{background:var(--blue-soft)}
.file-row{display:flex;align-items:center;gap:11px;padding:10px 0;border-bottom:1px solid #eef1f6;font-size:12px}
.file-row:last-child{border-bottom:0}
.file-row .name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-row .size{color:var(--muted);font-size:11px;white-space:nowrap}
.file-row .ord{display:flex;gap:3px;flex-shrink:0}
.icon-btn{width:28px;height:28px;display:grid;place-items:center;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--sub)}
.icon-btn:hover{border-color:#c3d1ea;color:var(--blue)}
.icon-btn svg{width:14px;height:14px}
.icon-btn:disabled{opacity:.35}

/* QR·이미지·이모지 무대 */
.stage{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:22px;border-radius:12px;background:#f7f9fd;border:1px solid #e7ecf5}
.stage canvas,.stage img{max-width:100%;height:auto;image-rendering:pixelated;border-radius:6px;background:#fff}
.stage.compact{padding:14px}
.qr-stage canvas{width:220px;height:220px;box-shadow:0 2px 10px #182a5112}
.emoji-stage{display:flex;gap:18px;align-items:center;justify-content:center;flex-wrap:wrap}
.emoji-stage .preview-big{width:128px;height:128px;border-radius:14px;background:#fff;border:1px solid #e7ecf5;display:grid;place-items:center;overflow:hidden}
.emoji-stage .preview-small{width:32px;height:32px;border-radius:6px;overflow:hidden;background:#fff;border:1px solid #e7ecf5;display:grid;place-items:center}
.emoji-stage canvas{display:block}

/* 계산 기준 박스 */
.criteria{background:#f7f9fd;border:1px solid #e8eef8;border-radius:12px;padding:16px 18px;font-size:12px;line-height:1.85;color:var(--sub)}
.criteria b{color:var(--ink)}
.criteria ul{margin:6px 0 0;padding-left:17px}
.criteria li{margin:2px 0}
.criteria .asof{display:inline-block;font-size:10px;color:#5b78b3;background:#edf3ff;border-radius:5px;padding:1px 7px;margin-left:6px;vertical-align:1px}
.help-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:14px}
.help-grid article{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px}
.help-grid h3{font-size:13px;margin-bottom:6px}
.help-grid p{font-size:12px;color:var(--sub);line-height:1.8}
.panel-section-title{font-size:14px;font-weight:700;margin:26px 0 10px;letter-spacing:-.02em}
.panel-section-title:first-child{margin-top:0}
.tool-faq{margin:34px 0 0;max-width:none}
.tool-faq h2{font-size:20px;margin-bottom:6px}
.tool-help{margin-top:34px}
.tool-help h2{font-size:20px}
.tool-tabs{margin-bottom:16px}
.tabpane[hidden]{display:none!important}
.notice{font-size:11px;color:#81642b;background:#fff8e8;border:1px solid #f1e4c5;padding:10px 13px;border-radius:9px;line-height:1.75;margin-top:12px}
.tiny-note{font-size:11px;color:var(--muted);line-height:1.7}

/* 상세 aside 스택 */
.aside-stack{display:flex;flex-direction:column;gap:14px}

/* 반응형 보정 */
@media(max-width:1000px){
 .help-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
 .field-row,.field-row.three{grid-template-columns:1fr}
 .result-big{font-size:29px}
 .data-table{min-width:380px}
 .stage{padding:16px}
 .qr-stage canvas{width:190px;height:190px}
 .detail-main .result-list{max-height:420px}
}

/* --- v2 polish --- */
.form-help + .field-row,.field-row + .field-row,.field-row + .field-group,.field-group + .field-row{margin-top:14px}
input[type=color].field{padding:5px;height:46px;cursor:pointer}
.ad-canvas{background:#f7f8fb;border:1px dashed #e2e7ef;color:#a3adbb}
.ad-canvas strong{color:#98a4b4}
.ad-size{color:#a8b2c0}
.home-ad-band{border-top:0}
.detail-main .field-row .form-help{margin-top:6px}
.book-item summary::-webkit-details-marker{display:none}
.book-item[open] summary{border-bottom:1px solid #eef1f6}
@media(max-width:760px){
  .ad-inline .ad-canvas{height:110px}
  .home-list-ad{display:none}
  .detail-main .workspace>aside>.helper-box{font-size:11px}
}

/* 로고 타이포 (영문 단일 표기) */
.brand{letter-spacing:-.035em;font-weight:800}

/* ===== 광고 슬롯 OFF (2026-11-25, 애드센스 승인 전) =====
   광고 자리(좌우 레일·상단·인피드·중간·하단)와 그 여백을 화면에서 모두 숨깁니다.
   슬롯 HTML과 data-ad-slot ID는 그대로 남아 있으므로,
   애드센스 코드를 넣을 때는 이 블록만 지우면 광고 자리가 원래대로 돌아옵니다. */
.ad-placement,
.side-ad,
.ad-preview-note,
.home-ad-band,
.home-list-ad,
.catalog-break,
.ad-label,
.ad-canvas{display:none!important}

/* 사이드 레일이 빠진 만큼 본문을 가운데로 넓게 (헤더·본문·푸터 폭 일치) */
@media(min-width:1200px){
  .wrap{width:min(var(--content-width),calc(100% - 64px))}
  .monetized-shell{display:block;width:min(var(--content-width),calc(100% - 64px))}
}
