@charset "UTF-8";
/* Tools — 매듭달이 만든 도구를 모아 두는 곳 (tools/ 아래 모든 화면이 함께 씀)
   색·글꼴은 허브(style.css)와 같은 것: 남색 바탕 · 금빛 · Cinzel / Noto Serif KR / Noto Sans KR */
:root {
    --primary-color: #c5a059;
    --bg-dark: #0a0a1a;
    --line: rgba(255, 255, 255, 0.09);
    --muted: #9a9aa6;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    min-height: 100vh; background-color: var(--bg-dark); color: #fff; font-family: 'Noto Sans KR', sans-serif;
}
/* 배경 그림은 화면에 고정된 층으로 (휴대폰은 background-attachment: fixed 를 잘 지원하지 않음) */
body::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.92)), url('../assets/images/background2.webp') center / cover no-repeat;
}
.page-fade { position: fixed; inset: 0; background: var(--bg-dark); z-index: 99999; opacity: 0; transition: opacity 0.32s ease; pointer-events: none; }
.page-fade.show { opacity: 1; }

/* 머리줄: 왼쪽 로고(→ 아카이브) · 오른쪽 돌아가기 */
.t-head {
    position: sticky; top: 0; z-index: 10; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
    background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0));
}
.t-head a { display: inline-flex; align-items: center; }
.t-logo { height: 30px; width: auto; filter: drop-shadow(0 0 8px rgba(255,255,255,0.3)); }
.t-back { font-family: 'Noto Serif KR', serif; font-size: 0.95rem; color: #ccc; text-decoration: none; letter-spacing: 1px; gap: 8px; }
.t-back:hover { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.t-head a:focus-visible, .t-card:focus-visible, .t-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }

/* 배경음악 단추 (bgm.js 가 그림) — 허브에서 듣던 곡을 이어 틈 */
.t-head-r { display: flex; align-items: center; gap: 18px; }
.t-music { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 8px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgba(197, 160, 89, 0.45); background: rgba(10, 10, 26, 0.6); color: #ddd; font: 400 0.8rem 'Noto Sans KR', sans-serif; }
.t-music:hover { border-color: var(--primary-color); color: #fff; }
.t-music:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }
.t-music svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--primary-color); fill: #0a0a1a; flex: none; }
.t-music .i-pause, .t-music.on .i-play { display: none; }
.t-music.on .i-pause { display: block; }
.t-music-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .t-music-name { display: none; } .t-music { padding: 0 7px; } .t-head-r { gap: 12px; } }

.t-main { width: 100%; max-width: 980px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); }
/* Tools 제목 = 손글씨 로고 (가운데 위) */
.t-titlewrap { margin: 4px 0 34px; text-align: center; line-height: 0; }
.t-titlelogo { width: min(320px, 68%); height: auto; filter: drop-shadow(0 0 14px rgba(255,255,255,0.25)); }
.t-eyebrow { font-family: 'Cinzel', serif; font-size: 0.8rem; letter-spacing: 4px; color: var(--primary-color); margin: 0; }
.t-title { font-family: 'Cinzel', serif; font-weight: 700; font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: 6px; margin: 6px 0 4px; color: #fff; }
.t-lead { font-family: 'Noto Serif KR', serif; color: var(--muted); margin: 0 0 34px; letter-spacing: 1px; word-break: keep-all; }

/* 도구 단추: 2열 */
.t-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .t-grid { grid-template-columns: 1fr; } }
.t-card {
    display: flex; align-items: center; gap: 20px; min-height: 132px; padding: 22px 24px; text-decoration: none; color: inherit;
    background: rgba(12, 12, 30, 0.82); border: 1px solid rgba(197, 160, 89, 0.3); border-radius: 14px;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 10px 28px rgba(0,0,0,0.45);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
a.t-card:hover { border-color: rgba(197, 160, 89, 0.75); background: rgba(28, 24, 40, 0.9); transform: translateY(-4px); }
.t-card img { width: 72px; height: 72px; flex: none; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.55)); }
.t-card-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.t-card-title { font-family: 'Noto Serif KR', serif; font-size: 1.25rem; font-weight: 500; letter-spacing: 1px; color: #fff; }
.t-card-desc { font-size: 0.88rem; font-weight: 300; color: var(--muted); line-height: 1.6; word-break: keep-all; }
.t-btn {
    align-self: flex-start; margin-top: 6px; padding: 6px 18px; border-radius: 999px; border: 1px solid var(--primary-color);
    background: rgba(197, 160, 89, 0.16); color: var(--primary-color); font-size: 0.85rem; letter-spacing: 2px; transition: background 0.3s, color 0.3s;
}
a.t-card:hover .t-btn { background: var(--primary-color); color: #0a0a1a; }
/* 아직 비어 있는 자리 */
.t-card.empty { justify-content: center; border-style: dashed; border-color: rgba(255,255,255,0.14); background: rgba(12, 12, 30, 0.6); box-shadow: none; color: rgba(255,255,255,0.22); font-family: 'Cinzel', serif; letter-spacing: 4px; font-size: 0.8rem; }

.t-foot { margin-top: 60px; text-align: center; color: #666; font-size: 0.85rem; letter-spacing: 1px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
