/* Copyright © 2026 Barrett Kim. All rights reserved. Unauthorized modification, reproduction, or redistribution is prohibited. */
/* wimtools 공용(자료실 메인, 도구 페이지). WIM style.css(Aqua 토큰, 툴바, 소스 목록, 섹션)를 먼저 불러오고 그 위에 얹는다. */

/* ---------- 툴바: 로그인 단추·계정 표시 (밝기 단추와 같은 금속) ---------- */
.acct {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; max-width: 210px; padding: 0 10px;
  border: 1px solid var(--metal-edge); border-radius: 7px; background: linear-gradient(180deg, var(--seg-top), var(--seg-bot));
  color: var(--metal-ink); font: 600 12px/1 var(--font-ui); cursor: pointer;
}
.acct:hover { filter: brightness(1.04); }
.acct span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .av { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--gloss-top), var(--gloss-bot)); color: var(--on-gloss); font-size: 10px; font-style: normal; }
button.aqua { cursor: pointer; }
.aqua.lg { min-height: 38px; padding: 0 22px; font-size: 14px; }
.aqua.danger { --gloss-top: #ff8a80; --gloss-bot: #d70015; --gloss-edge: #a3000f; }
.aqua:disabled, .metal:disabled { opacity: .55; cursor: default; }
.metal {
  display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: linear-gradient(180deg, var(--seg-top), var(--seg-bot)); color: var(--metal-ink);
  font: 600 13px/1 var(--font-ui); white-space: nowrap; cursor: pointer;
}
.metal.lg { min-height: 38px; padding: 0 22px; font-size: 14px; }
.metal:hover { text-decoration: none; filter: brightness(1.04); }

/* ---------- 자료실 선반: 도구 하나가 앨범 하나 ---------- */
#top.hub { padding-bottom: clamp(64px, 9vw, 112px); }
.shelf { list-style: none; margin: clamp(44px, 6vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 250px)); justify-content: center; gap: 40px clamp(20px, 3vw, 36px); text-align: left; }
.album { display: grid; gap: 3px; color: var(--text); }
.album:hover { text-decoration: none; }
.album svg, .album .ph { display: block; width: 100%; aspect-ratio: 1; margin-bottom: 14px; border-radius: 4px; }
.album svg { box-shadow: 0 18px 36px rgba(0, 0, 0, .26); transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.album:hover svg { transform: translateY(-5px); box-shadow: 0 26px 44px rgba(0, 0, 0, .3); }
.album:focus-visible { outline: none; }
.album:focus-visible svg { outline: 3px solid var(--blue-ring); outline-offset: 4px; }
.album b { font-size: 19px; letter-spacing: -.01em; }
.album .host { font-size: 15px; color: var(--muted); }
.album .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.album.soon { color: var(--muted); }
.album .ph { display: grid; place-items: center; align-content: center; gap: 8px; border: 2px dashed var(--line-strong); background: var(--glass); font-size: 15px; text-align: center; }
.album .ph svg { width: 34px; height: 34px; margin: 0; box-shadow: none; color: var(--muted); }

/* ---------- 업데이트 목록: iTunes 목록 보기 ---------- */
.updates td:first-child { width: 48px; }
.updates td.ver { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.updates td.note { color: var(--text-2); }
.updates td.date { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 후원 띠 ---------- */
.give { display: grid; justify-items: center; gap: 18px; }
.give .fine { margin-top: -4px; }

/* ---------- 바닥: 정책 링크 줄 ---------- */
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.foot-links a { color: var(--metal-ink); }

/* ---------- 창(시트): 로그인 · 후원 · 내 계정. 창 제목 막대 + 빨간 닫기 단추 ---------- */
dialog.sheet {
  width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); color: var(--text); box-shadow: var(--shadow-pop);
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog.sheet[open] { animation: sheet-in .34s var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.sheet-bar {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: center; height: 30px;
  background: linear-gradient(180deg, var(--metal-top), var(--metal-bot)); border-bottom: 1px solid var(--metal-edge); color: var(--metal-ink); font: 600 12px/1 var(--font-ui);
}
.sheet-x {
  position: absolute; left: 10px; top: 8px; width: 13px; height: 13px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, .3); background: radial-gradient(circle at 50% 30%, #ff9a8f, #e2463b 70%);
}
.sheet-x:hover { background: radial-gradient(circle at 50% 30%, #ff9a8f, #c7362c 70%); }
.sheet-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 26px 26px 24px; }  /* 칸이 내용 폭만큼 늘어나 창 밖으로 밀리지 않게 */
.sheet-body h3 { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.sheet-body > p { color: var(--muted); font-size: 15px; }
.sheet-icon { width: 46px; height: 46px; color: var(--brand-ink); }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.sheet-actions.stack { display: grid; justify-content: stretch; }
/* 카카오페이 송금코드는 휴대폰에서만 열린다: PC는 QR을 찍게 하고, 휴대폰은 단추만 */
.kqr { display: grid; justify-items: center; gap: 8px; margin: 0; padding: 14px; text-align: center; border-radius: 12px; background: var(--section-alt); color: var(--muted); font-size: 13px; }
.kqr img { width: 148px; max-width: 100%; height: auto; border-radius: 6px; background: #fff; }
@media (hover: none) and (pointer: coarse) { .kqr { display: none; } }
.fine { font-size: 12px; line-height: 1.5; color: var(--muted); }

/* Google 버튼(Google이 그려 줌)과 사람 확인(Turnstile) 자리 */
.gbtn-slot { min-height: 44px; display: grid; justify-items: center; }
.opt { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--text-2); cursor: pointer; }
.opt input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--link); }
.ts-slot { min-height: 65px; }
.ts-slot:empty { display: none; }
.or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line-strong); }
.field { display: flex; gap: 8px; }
.field input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--bg); color: var(--text); font: 15px var(--font-ui);
}
.field input:focus { outline: 3px solid var(--blue-ring); outline-offset: 0; border-color: var(--blue); }
.field input.code { font: 600 22px/1 var(--font-mono); letter-spacing: .45em; text-align: center; }
.err { color: var(--red); font-size: 13px; min-height: 1em; }
.err:empty { display: none; }
.linkbtn { all: unset; color: var(--link); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn:focus-visible { outline: 3px solid var(--blue-ring); border-radius: 4px; }
.linkbtn.danger { color: var(--red); }
.who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--section-alt); }
.who .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--gloss-top), var(--gloss-bot)); color: var(--on-gloss); font-weight: 700; }
.who b { display: block; }
.who small { color: var(--muted); font-size: 13px; }

/* ---------- 알림: 아래 가운데 잠깐 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; translate: -50% 0; max-width: calc(100vw - 32px);
  padding: 10px 18px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-pop);
  animation: toast 3.4s both;
}
@keyframes toast { 0% { opacity: 0; transform: translateY(10px); } 8%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- 도구 페이지: 기능 타일의 작은 화면 조각 ---------- */
.mini-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--surface-3); }
.mini-seg span { min-width: 42px; padding: 3px 10px; border-radius: 6px; font-size: 13px; text-align: center; color: var(--text-2); }
.mini-seg .on { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.mini-num { display: inline-block; min-width: 58px; padding: 3px 9px; border-radius: 7px; background: var(--surface-3); text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.mini-switch { display: inline-flex; align-items: center; gap: 8px; }
.mini-switch i { position: relative; width: 36px; height: 22px; border-radius: 11px; background: var(--green); }
.mini-switch i::after { content: ""; position: absolute; top: 2px; left: 16px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.mini-banner { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 340px; padding: 9px 12px; border-radius: 10px; background: var(--blue-tint); font-size: 14px; }
.mini-banner b { color: var(--blue); }
.mini-banner span { margin-left: auto; color: var(--link); font-weight: 600; }
.ui-row .lbl { display: flex; gap: 6px; align-items: center; }

/* ---------- 도구 페이지: 내려받기 카드 ---------- */
.dl { margin-top: 48px; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; padding: clamp(22px, 3vw, 34px); border-radius: 24px; background: var(--bg); }
.dl-cover svg { display: block; width: 100%; aspect-ratio: 1; border-radius: 4px; box-shadow: 0 14px 30px rgba(0, 0, 0, .22); }
.dl-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.dl-head h3 { font-size: var(--t-title); letter-spacing: -.02em; }
.dl-head span { color: var(--muted); font-size: 15px; }
.files { list-style: none; margin: 18px 0 0; padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; }
.files li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; }
.files li + li { border-top: 1px solid var(--line); }
.files li:nth-child(even) { background: var(--zebra); }
.ficon { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font: 700 10px/1 var(--font-mono); letter-spacing: .02em; }
.ficon.rbz { background: var(--blue-tint); color: var(--blue); }
.ficon.lsp { background: var(--green-tint); color: var(--green); }
.files b { display: block; font-size: 15px; }
.files small { display: block; color: var(--muted); font-size: 13px; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* 설치 카드 2장, 목록 3장 */
.install.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.install.one { grid-template-columns: minmax(0, 560px); justify-content: center; }
.inst-tip { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--section-alt); font-size: 13px; color: var(--text-2); }
.playlist li .pill { margin-left: 6px; }
.playlist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

@media (max-width: 680px) {
  .updates th:nth-child(4), .updates td.note { display: none; }  /* 폰에서는 바뀐 점 칸을 빼 날짜가 잘리지 않게 */
  .install.two { grid-template-columns: minmax(0, 1fr); }
  .dl { grid-template-columns: minmax(0, 1fr); }
  .dl-cover { width: 112px; }
  .files li { grid-template-columns: 36px minmax(0, 1fr); }
  .files li .aqua { grid-column: 1 / -1; }
  /* 로그인하면 이메일 대신 동그라미 머리글자만 */
  .acct.in { width: 30px; padding: 0; justify-content: center; }
  .acct.in span { display: none; }
}
/* 휴대폰: 잘린 LCD는 빼고 로고 · 언어 · 밝기 · 계정만 */
@media (max-width: 480px) {
  .toolbar .lcd { visibility: hidden; }
}

/* ---------- 개인정보 처리방침 · 이용 조건 ---------- */
.legal section { padding-block: clamp(48px, 7vw, 96px); }
.legal .wrap { max-width: 760px; }
.legal h2 { margin: 40px 0 12px; font-size: var(--t-title); letter-spacing: -.02em; }
.legal p, .legal li { color: var(--text-2); font-size: 16px; }
.legal p + p { margin-top: 10px; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.legal-meta { margin-top: 10px; color: var(--muted) !important; font-size: 14px !important; }
.legal .headline + .legal-meta + p { margin-top: 28px; }
.legal table { width: 100%; margin: 4px 0 12px; border-collapse: collapse; font-size: 14px; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; display: block; overflow-x: auto; }
.legal th { padding: 8px 12px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line-strong); background: linear-gradient(180deg, var(--bg), var(--surface-2)); white-space: nowrap; }
.legal td { padding: 9px 12px; vertical-align: top; color: var(--text-2); }
.legal tbody tr:nth-child(even) { background: var(--zebra); }

/* 좁은 화면: Turnstile 위젯 최소 폭(300px)이 창 안에 들어오게 여백을 줄인다 */
@media (max-width: 420px) { .sheet-body { padding: 22px 18px 20px; } }

/* 스케치업판 ↔ 라이노판 페이지 오가기 (main 맨 위 띠) */
.host-switch { margin: 0; padding: 11px 16px; text-align: center; font-size: 14px; color: var(--text-2); background: var(--section-alt); border-bottom: 1px solid var(--line); }
.host-switch a { color: var(--link); font-weight: 500; }
.ficon.yak { background: var(--amber-tint); color: var(--amber); }

/* 자료실 메인: WIM을 맨 위에 크게, 나머지 도구는 아래 커버 플로(shared/coverflow.js)로 넘겨 보기 */
.shelf.tiered { grid-template-columns: minmax(0, 300px); justify-content: center; }
.cf { --cover: clamp(150px, 19vw, 230px); position: relative; margin: clamp(40px, 6vw, 64px) auto 0; max-width: 1080px; text-align: center; user-select: none; -webkit-user-select: none; }
.cf-stage { position: relative; height: calc(var(--cover) * 1.55); perspective: 1100px; overflow: hidden; touch-action: pan-y; cursor: grab; outline: none; }
.cf-stage.dragging { cursor: grabbing; }
.cf-item { position: absolute; left: 50%; top: 6px; width: var(--cover); height: var(--cover); margin-left: calc(var(--cover) / -2); transform-style: preserve-3d; will-change: transform; -webkit-tap-highlight-color: transparent; }
.cf-item svg { display: block; width: 100%; height: 100%; border-radius: 4px; box-shadow: 0 18px 36px rgba(0, 0, 0, .26); -webkit-box-reflect: below 2px linear-gradient(transparent 62%, rgba(255, 255, 255, .22)); }
.cf-item:focus-visible { outline: none; }
.cf-item:focus-visible svg { outline: 3px solid var(--blue-ring); outline-offset: 4px; }
.cf-item::after { content: ""; position: absolute; inset: 0; border-radius: 4px; background: #000; opacity: var(--shade, 0); pointer-events: none; }

.cf-caption { display: grid; gap: 3px; justify-items: center; min-height: 86px; margin-top: 4px; }
.cf-caption b { font-size: 21px; letter-spacing: -.01em; }
.cf-caption .host { font-size: 15px; color: var(--muted); }
.cf-caption .meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); }

.cf-nav { position: absolute; top: calc(var(--cover, 230px) * .55); z-index: 200; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--text); box-shadow: var(--shadow-card); cursor: pointer; }
.cf-nav svg { width: 16px; height: 16px; }
.cf-nav:disabled { opacity: .35; cursor: default; }
.cf-prev { left: 6px; } .cf-next { right: 6px; }
.cf-dots { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.cf-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--line-strong); cursor: pointer; transition: width .3s, background .3s; }
.cf-dots button[aria-current="true"] { width: 20px; border-radius: 4px; background: var(--text-2); }
.cf-count { margin-top: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 680px) { .cf-nav { display: none; } }

.cf-cap { display: none; }

/* 도구 페이지 아래 건의게시판 링크 */
.board-links { margin-top: 28px; font-size: 15px; }
