/* ══════════════════════════════════════════════════════════════════════
   AI 툴 공통 — [redesign/ai-studio 2026-10-30] 시안 'AI 툴 페이지 시안'
   머리줄(.ais-bar): 짙은 줄 + 툴 7개 탭 + 결과함 — 지금 툴의 탭 밑줄만 그 툴 색
   색 띠(.ais-band): 툴 색 바탕 + AI 배경 이미지 + 제목·설명 + 작업 종류 탭
   툴 색은 menu/tool/ai_studio.py 한 곳에 있고, 띠가 --c / --rgb 로 받는다.
   ══════════════════════════════════════════════════════════════════════ */

/* AI 툴 페이지는 바탕을 옅은 회색, 헤더를 흰색으로 (시안) */
:root:has(.ais-bar) { --dp-bg: #F6F5F8; --dp-head: #FFFFFF; --dp-line: #E6E8EB; }

/* ── 머리줄 ── */
.ais-bar {
  display: flex; align-items: stretch; gap: 4px; height: 52px; padding: 0 16px 0 28px; box-sizing: border-box;
  background: #1C1A22; color: #FFFFFF; font-family: var(--font-menu, 'Wanted Sans'), 'DPmind Ko', sans-serif;
}
.ais-bar-k {
  display: flex; align-items: center; padding-right: 14px; flex: none;
  font: 700 11px 'Google Sans', sans-serif; letter-spacing: .2em; color: #B9B3C4; white-space: nowrap;
}
.ais-bar-tabs { display: flex; align-items: stretch; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ais-bar-tabs::-webkit-scrollbar { display: none; }
.ais-bar-tab {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; white-space: nowrap; flex: none;
  font-size: 14px; font-weight: 400; color: #C9C5D1; text-decoration: none;
}
.ais-bar-tab:hover { color: #FFFFFF; background: rgba(255, 255, 255, .06); }
.ais-bar-tab img { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.ais-bar-tab.is-active { color: #FFFFFF; font-weight: 700; background: rgba(255, 255, 255, .10); box-shadow: inset 0 -3px 0 var(--hue, #FFFFFF); }
.ais-bar-tab .ais-s { display: none; }
.ais-bar-results {
  margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 12px; flex: none;
  font-size: 14px; font-weight: 500; color: #FFFFFF; text-decoration: none; white-space: nowrap;
}
.ais-bar-results:hover { color: #FFFFFF; background: rgba(255, 255, 255, .06); }
.ais-bar-results.is-active { background: rgba(255, 255, 255, .10); box-shadow: inset 0 -3px 0 #B8C2D1; font-weight: 700; }

/* ── 색 띠 ── */
.ais-band {
  position: relative; min-height: 150px; box-sizing: border-box; overflow: hidden;
  background: var(--c, #1F5FAE); color: #FFFFFF;
  display: flex; flex-direction: column; justify-content: flex-end;
  font-family: 'Google Sans', 'DPmind Ko', 'Noto Sans KR', sans-serif;
}
.ais-band.has-tabs { min-height: 176px; }
.ais-band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; }
.ais-band::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(var(--rgb), .96) 0%, rgba(var(--rgb), .86) 38%, rgba(var(--rgb), .42) 72%, rgba(var(--rgb), .18) 100%);
}
.ais-band-in { position: relative; padding: 26px 28px 0; display: flex; flex-direction: column; }
.ais-band-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-bottom: 18px; }
.ais-band-icon { width: 46px; height: 46px; border-radius: 12px; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .28), 0 6px 16px rgba(0, 0, 0, .25); }
.ais-band-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ais-band-k { font: 700 11px 'Google Sans', sans-serif; letter-spacing: .2em; color: rgba(255, 255, 255, .82); }
.ais-band h1 { margin: 0; font-family: var(--font-menu, 'Wanted Sans'), 'DPmind Ko', sans-serif; font-size: 24px; font-weight: 700; line-height: 1.2; color: #FFFFFF; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.ais-band-dek { flex: 1 1 260px; max-width: 520px; margin: 0; font-size: 13.5px; line-height: 1.6; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.ais-band-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ais-band-tabs::-webkit-scrollbar { display: none; }
.ais-band-tab {
  flex: none; display: flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, .16); color: #FFFFFF; text-decoration: none; white-space: nowrap;
  font-family: var(--font-menu, 'Wanted Sans'), 'DPmind Ko', sans-serif; font-size: 14px; font-weight: 500;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ais-band-tab:hover { color: #FFFFFF; background: rgba(255, 255, 255, .26); }
.ais-band-tab.is-active { background: var(--page, #F6F5F8); color: var(--c, #1F5FAE); font-weight: 700; }
.ais-band-tab.is-active:hover { background: var(--page, #F6F5F8); color: var(--c, #1F5FAE); }
.ais-band-tab small { margin-left: 6px; font: 500 10px 'Google Sans', sans-serif; opacity: .75; }

/* 페이지 본문 공통 여백 — 각 툴의 기존 wrap 이 자기 여백을 가지고 있으면 그대로 둔다 */
.ais-body { padding: 16px 20px 40px; }

/* ── 모바일·패드 ── */
@media (max-width: 860px) {
  .ais-bar { height: 48px; padding: 0 8px; }
  .ais-bar-k { display: none; }
  .ais-bar-tab { padding: 0 10px; }
  .ais-bar-tab .ais-l { display: none; }
  .ais-bar-tab .ais-s { display: inline; }
  .ais-bar-tab img { width: 22px; height: 22px; }
  .ais-bar-results { padding: 0 10px; }
  .ais-band { min-height: 0; }
  .ais-band.has-tabs { min-height: 0; }
  .ais-band-in { padding: 16px 16px 0; }
  .ais-band-head { gap: 10px; padding-bottom: 12px; }
  .ais-band-icon { width: 34px; height: 34px; border-radius: 9px; }
  .ais-band h1 { font-size: 19px; }
  .ais-band-k { font-size: 10px; }
  .ais-band-dek { flex-basis: 100%; max-width: none; font-size: 12.5px; line-height: 1.5; }
  .ais-band-tabs { margin: 0 -16px; padding: 0 16px; }
  .ais-band-tab { height: 40px; padding: 0 14px; font-size: 13.5px; }
  .ais-body { padding: 12px 16px 32px; }
}
.ais-bar ~ .ai-tabs-wrap { margin: 16px 20px 40px; }
@media (max-width: 860px) { .ais-bar ~ .ai-tabs-wrap { margin: 12px 0 32px; border-radius: 0; border-left: 0; border-right: 0; } }
