/* coriworks-templates site/styles.css, .tg 안으로 가둠(build.mjs 가 생성, 직접 고치지 않음) */
.tg { --bg: #ffffff; --surface: #f4f6f9; --line: #e3e7ee; --ink: #0e1726; --muted: #5b6475; --navy: #0b1f44; --accent: #1b5bff; --accent-ink: #ffffff; --backdrop: rgba(11, 31, 68, 0.48); --fs-xs: 13px; --fs-s: 14px; --fs-m: 16px; --fs-l: 20px; --fs-xl: 32px; --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --r1: 8px; --r2: 12px; --r-pill: 999px; --sh1: 0 1px 2px rgba(14, 23, 38, 0.06); --sh2: 0 12px 40px rgba(14, 23, 38, 0.18); --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Segoe UI", Roboto, sans-serif; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; --maxw: 1440px; --pad: 24px; }
.tg [hidden] { display: none !important; }
body.locked { overflow: hidden; }
.tg a { color: inherit; }
.tg button { font: inherit; color: inherit; }
.tg :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tg .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tg .tabs-wrap { position: sticky; top: 64px; z-index: 10; background: var(--bg); margin: 0 calc(var(--pad) * -1); padding: var(--s2) var(--pad); }
.tg .tabs { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; }
.tg .tabs::-webkit-scrollbar { display: none; }
.tg .tab { flex: none; border: 0; background: transparent; min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-pill); font-size: var(--fs-s); font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: var(--s2); }
.tg .tab:hover { background: var(--surface); color: var(--ink); }
.tg .tab[aria-selected="true"] { background: var(--navy); color: #fff; }
.tg .tab__n { font-size: var(--fs-xs); font-weight: 500; opacity: 0.8; }
.tg .count { margin: var(--s2) 0 var(--s3); font-size: var(--fs-xs); color: var(--muted); }
.tg .grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5) var(--s4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tg .card { min-width: 0; }
.tg .card__btn { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r2); }
.tg .card__media { position: relative; aspect-ratio: 8 / 5; border-radius: var(--r2); overflow: hidden; background: var(--surface); box-shadow: var(--sh1); }
.tg .card__media video, .tg .card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tg .card__btn:hover .card__media { box-shadow: 0 0 0 2px var(--line), var(--sh1); }
.tg .card__ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--fs-xl); font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.tg .card__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s1) 0; }
.tg .card__name { font-size: var(--fs-s); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg .card__cat { font-size: var(--fs-xs); color: var(--muted); flex: none; }
.tg .empty { color: var(--muted); padding: var(--s7) 0; text-align: center; }
.tg .backdrop { position: fixed; inset: 0; z-index: 40; background: var(--backdrop); opacity: 0; transition: opacity 200ms ease; }
.tg .backdrop.open { opacity: 1; }
.tg .panel { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100vw; background: var(--bg); box-shadow: var(--sh2); display: flex; flex-direction: column; transform: translateX(100%); transition: transform 220ms cubic-bezier(.2,.7,.2,1); outline: none; }
.tg .panel.open { transform: none; }
.tg .panel__grip { display: none; }
.tg .panel__head { display: flex; align-items: center; justify-content: space-between; padding: var(--s3) var(--s3) var(--s2) var(--s5); }
.tg .panel__body { overflow-y: auto; padding: 0 var(--s5) var(--s6); overscroll-behavior: contain; }
.tg .icon-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: var(--r-pill); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.tg .icon-btn:hover { background: var(--surface); }
.tg .icon-btn svg { width: 22px; height: 22px; }
.tg .panel__media { aspect-ratio: 8 / 5; border-radius: var(--r2); overflow: hidden; background: var(--surface); position: relative; }
.tg .panel__media video, .tg .panel__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tg .panel__name { margin: var(--s4) 0 var(--s2); font-size: var(--fs-l); line-height: 1.3; }
.tg .panel__desc { margin: 0 0 var(--s4); color: var(--muted); font-size: var(--fs-s); line-height: 1.6; }
.tg .chip { display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: 600; padding: var(--s1) var(--s3); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); }
.tg .chip--cat { background: var(--surface); color: var(--navy); }
.tg .meta { margin: 0 0 var(--s5); display: grid; grid-template-columns: 56px 1fr; gap: var(--s3) var(--s3); align-items: start; }
.tg .meta dt { font-size: var(--fs-xs); color: var(--muted); padding-top: var(--s1); }
.tg .meta dd { margin: 0; }
.tg .chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1); }
.tg .actions { display: grid; gap: var(--s2); }
.tg .gbtn { min-height: 48px; border-radius: var(--r2); display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); font-size: var(--fs-m); font-weight: 600; text-decoration: none; cursor: pointer; border: 0; padding: 0 var(--s4); }
.tg .gbtn svg { width: 18px; height: 18px; }
.tg .btn--primary { background: var(--accent); color: var(--accent-ink); }
.tg .btn--primary:hover { background: #164ad6; }
.tg .btn--ghost { background: var(--surface); color: var(--ink); }
.tg .btn--ghost:hover { background: #e9edf3; }
.tg .btn--done { background: #e6f0ff; color: #0b3fb8; }
.tg .cmd { margin-top: var(--s3); }
.tg .cmd__code { display: block; font: 500 var(--fs-xs)/1.55 var(--mono); background: var(--surface); color: var(--ink); padding: var(--s3); border-radius: var(--r1); overflow-wrap: anywhere; user-select: all; }
@media (max-width: 1100px) {
.tg .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
.tg .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
.tg { --pad: 16px; --fs-xl: 26px; }
.tg .grid { grid-template-columns: 1fr; gap: var(--s5); }
.tg .panel { top: auto; left: 0; right: 0; width: 100%; max-height: 88vh; max-height: 88dvh; border-radius: var(--r2) var(--r2) 0 0; transform: translateY(100%); }
.tg .panel.open { transform: none; }
.tg .panel__grip { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: var(--s2) auto 0; }
.tg .panel__head { padding-left: var(--s4); }
.tg .panel__body { padding: 0 var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
.tg .backdrop, .tg .panel { transition: none; }
}
/* 사이트 틀 안에 맞춤 */
.tg { --font: inherit; }
.tg .tabs-wrap { top: 72px; }
@media (max-width: 900px) { .tg .tabs-wrap { top: 60px; } }
.tg .chip { cursor: auto; }
.tg .gbtn:hover { text-decoration: none; }
