/* 자동 생성: tools/Sync.java 가 123서버의 스타일을 .dgs-scope 안으로 가둔 것. 직접 고치지 마세요. */
.dgs-scope :where(:not(svg, svg *)) { all: revert; }
.dgs-scope { display: block; min-height: 70vh; }
.dgs-scope {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #f0f1f3;
  --text: #17181c;
  --text-2: #5d6170;
  --line: #e3e5ea;
  --accent: #3366ff;
  --accent-text: #ffffff;
  --danger: #e5484d;
  --code-bg: #14161b;
  --code-text: #e6e8ee;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .06);
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SF Mono", "D2Coding", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
.dgs-scope {
    --bg: #0f1013; --surface: #17191e; --surface-2: #20232a; --text: #eceef3; --text-2: #9aa0ad;
    --line: #2a2d35; --accent: #5b84ff; --code-bg: #0b0c0f; --shadow: 0 8px 24px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}
.dgs-scope * { box-sizing: border-box; }
.dgs-scope, .dgs-scope { margin: 0; }
.dgs-scope { background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
.dgs-scope a { color: inherit; }
.dgs-scope button, .dgs-scope input, .dgs-scope select, .dgs-scope textarea { font: inherit; color: inherit; }
.dgs-scope .topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px;
  padding: 14px max(16px, calc((100% - 1240px) / 2)); background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.dgs-scope .brand { font-weight: 800; font-size: 18px; letter-spacing: -.02em; text-decoration: none; display: flex; gap: 8px; align-items: center; }
.dgs-scope .brand i { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, #3366ff, #8b5cf6); display: inline-block; }
.dgs-scope .topbar .spacer { flex: 1; }
.dgs-scope .search { width: min(280px, 40vw); padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); outline: none; }
.dgs-scope .search:focus { border-color: var(--accent); }
.dgs-scope .link-btn { font-size: 14px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.dgs-scope .link-btn:hover { color: var(--text); }
.dgs-scope .brand-sub { font-weight: 600; opacity: .6; }
.dgs-scope .dgs-nav { display: flex; gap: 2px; margin-left: auto; }
.dgs-scope .dgs-nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.dgs-scope .dgs-nav a:hover { color: var(--text); background: var(--surface-2); }
.dgs-scope .dgs-nav a[aria-current] { color: var(--text); }
.dgs-scope .dgs-subnav { display: none; }
@media (max-width: 760px) {
.dgs-scope.nk-has-bar .dgs-subnav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 56px; z-index: 9; scrollbar-width: none; }
.dgs-scope .dgs-subnav a { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); text-decoration: none; font-size: 13px; font-weight: 600; }
.dgs-scope .dgs-subnav a[aria-current] { background: var(--text); color: var(--bg); }
}
.dgs-scope .page-search { margin: 20px 0 -8px; }
.dgs-scope .page-search .search { width: min(360px, 100%); }
.dgs-scope .wrap { max-width: 1240px; margin: 0 auto; padding: 32px 16px 80px; }
.dgs-scope .hero h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.03em; }
.dgs-scope .hero p { margin: 0; color: var(--text-2); }
.dgs-scope .chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.dgs-scope .chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; }
.dgs-scope .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.dgs-scope .chip small { opacity: .55; margin-left: 4px; }
.dgs-scope .section-title { font-size: 18px; margin: 36px 0 14px; letter-spacing: -.02em; }
.dgs-scope .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.dgs-scope .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; text-align: left; padding: 0; transition: transform .2s, box-shadow .2s;
}
.dgs-scope .card:hover, .dgs-scope .card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); outline: none; }
.dgs-scope .thumb { aspect-ratio: 16 / 10; background: var(--surface-2); position: relative; overflow: hidden; }
.dgs-scope .thumb video, .dgs-scope .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dgs-scope .thumb .badge {
  position: absolute; left: 10px; top: 10px; font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: rgb(0 0 0 / .55); color: #fff; backdrop-filter: blur(6px);
}
.dgs-scope .thumb .play {
  position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgb(255 255 255 / .9);
  display: grid; place-items: center; transition: opacity .2s;
}
.dgs-scope .thumb .play::before { content: ""; border-left: 9px solid #111; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 2px; }
.dgs-scope .card.playing .play { opacity: 0; }
.dgs-scope .card .meta { padding: 14px 16px 16px; }
.dgs-scope .card h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -.01em; }
.dgs-scope .card p { margin: 0; font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dgs-scope .empty { color: var(--text-2); padding: 60px 0; text-align: center; }
.dgs-scope dialog.detail {
  width: min(1200px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgb(0 0 0 / .35);
}
.dgs-scope dialog.detail::backdrop { background: rgb(10 12 18 / .6); backdrop-filter: blur(4px); }
.dgs-scope .detail-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dgs-scope .detail-head h2 { margin: 0; font-size: 18px; flex: 1; letter-spacing: -.02em; }
.dgs-scope .detail-head .cat { font-size: 12px; color: var(--text-2); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; }
.dgs-scope .icon-btn { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 18px; line-height: 1; }
.dgs-scope .detail-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-height: calc(100vh - 100px); }
.dgs-scope .detail-left { padding: 20px; overflow: auto; border-right: 1px solid var(--line); }
.dgs-scope .detail-left video { width: 100%; border-radius: 12px; background: #000; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
.dgs-scope .detail-left h4 { margin: 20px 0 6px; font-size: 14px; }
.dgs-scope .detail-left .desc, .dgs-scope .detail-left .usage { color: var(--text-2); font-size: 14px; white-space: pre-line; margin: 0; }
.dgs-scope .detail-left .actions { display: flex; gap: 8px; margin-top: 16px; }
.dgs-scope .btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 14px; text-decoration: none; font-weight: 600;
}
.dgs-scope .btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.dgs-scope .btn.danger { color: var(--danger); }
.dgs-scope .detail-right { display: flex; flex-direction: column; min-height: 0; background: var(--code-bg); }
.dgs-scope .code-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; color: #9aa0ad; font-size: 13px; border-bottom: 1px solid #23262e; }
.dgs-scope .code-bar .btn { padding: 5px 12px; font-size: 13px; background: #23262e; border-color: #2e323c; color: #e6e8ee; }
.dgs-scope pre.code { margin: 0; padding: 16px; overflow: auto; flex: 1; color: var(--code-text); font: 12.5px/1.65 var(--mono); tab-size: 2; }
.dgs-scope .tok-c { color: #6b7280; font-style: italic; }
.dgs-scope .tok-s { color: #a5d6a7; }
.dgs-scope .tok-k { color: #c4a7ff; }
.dgs-scope .tok-t { color: #7dd3fc; }
.dgs-scope .tok-n { color: #fbbf77; }
@media (max-width: 860px) {
.dgs-scope .detail-body { grid-template-columns: minmax(0, 1fr); overflow: auto; }
.dgs-scope .detail-left { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
.dgs-scope pre.code { max-height: 60vh; }
.dgs-scope .dgs-nav a { padding: 8px; }
}
.dgs-scope .admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 20px; align-items: start; }
.dgs-scope .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.dgs-scope .panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dgs-scope .panel-head h2 { margin: 0; font-size: 16px; }
.dgs-scope table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.dgs-scope table.list th, .dgs-scope table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.dgs-scope table.list th { color: var(--text-2); font-weight: 600; font-size: 13px; }
.dgs-scope table.list tr { cursor: pointer; }
.dgs-scope table.list tr:hover td { background: var(--surface-2); }
.dgs-scope table.list tr.active td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.dgs-scope table.list img { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--surface-2); display: block; }
.dgs-scope .status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.dgs-scope .status.on { background: color-mix(in srgb, #16a34a 15%, transparent); color: #16a34a; }
.dgs-scope form.editor { padding: 16px; display: grid; gap: 12px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.dgs-scope form.editor label { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.dgs-scope form.editor input[type=text], .dgs-scope form.editor input[type=number], .dgs-scope form.editor select, .dgs-scope form.editor textarea {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); outline: none; font-weight: 400; color: var(--text);
}
.dgs-scope form.editor input:focus, .dgs-scope form.editor select:focus, .dgs-scope form.editor textarea:focus { border-color: var(--accent); }
.dgs-scope form.editor textarea.mono { font: 12px/1.5 var(--mono); min-height: 220px; }
.dgs-scope form.editor .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dgs-scope form.editor .check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.dgs-scope form.editor .hint { font-weight: 400; font-size: 12px; }
.dgs-scope form.editor .preview { width: 100%; border-radius: 8px; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-2); }
.dgs-scope .form-actions { display: flex; gap: 8px; justify-content: space-between; }
.dgs-scope .toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.dgs-scope .toast.show { opacity: 1; }
@media (max-width: 980px) {
.dgs-scope .admin-layout { grid-template-columns: 1fr; }
.dgs-scope form.editor { position: static; max-height: none; }
}
.dgs-scope [data-nk-login]:not(.nk-show) { visibility: hidden; }
.dgs-scope [data-nk-sys="DGS"] .nk-tools .dgs-login-link { height: 32px; display: inline-flex; align-items: center; }
.dgs-scope .hero > h1, .dgs-scope .hero > p:not(.note) { display: none; }
.dgs-scope .hero { padding-top: 0; padding-bottom: 0; margin: 0; }
.dgs-scope main.wrap { max-width: none; padding-top: 24px; padding-left: clamp(16px, 2.5vw, 40px); padding-right: clamp(16px, 2.5vw, 40px); }
