@charset "UTF-8";

/* ===== Base Reset (가볍게) ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Pretendard", "Noto Sans KR", Arial, sans-serif;
  background: #2b2b2b;
  color: #e7e7e7;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); border:0;
}

/* ===== Theme Tokens (Illustrator-ish) ===== */
:root{
  --ui-0: #1f1f1f;   /* deepest */
  --ui-1: #2a2a2a;   /* panel */
  --ui-2: #333333;   /* raised */
  --ui-3: #3c3c3c;   /* borders */
  --txt-0:#f3f3f3;
  --txt-1:#cfcfcf;
  --txt-2:#9b9b9b;
  --accent:#3b82f6;

  --shadow: 0 10px 25px rgba(0,0,0,.35);
  --radius: 10px;
}

/* ===== App Layout ===== */
.ai-app{
  min-height: 100%;
  display: grid;
  grid-template-rows: 44px 1fr 28px;
}

/* ===== Topbar ===== */
.ai-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 0 12px;
  background: linear-gradient(#2e2e2e, #262626);
  border-bottom: 1px solid var(--ui-3);
}
.topbar-left{ display:flex; align-items:center; gap:12px; }
.app-badge{ display:flex; gap:8px; align-items:center; padding: 0 6px; }
.app-badge-dot{
  width: 10px; height: 10px; border-radius: 50%;
  background: #111;
  box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #444;
}
.topbar-menu{ display:flex; gap:10px; align-items:center; }
.menu-item{
  font-size: 12px;
  color: var(--txt-1);
  padding: 6px 8px;
  border-radius: 6px;
}
.menu-item:hover{
  background: rgba(255,255,255,.06);
  text-decoration: none;
}

.topbar-center{ flex: 1; display:flex; justify-content:center; }
.doc-title{
  font-size: 12px;
  color: var(--txt-2);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.doc-name{ color: var(--txt-0); }
.doc-sep{ margin: 0 6px; color: #666; }

.topbar-right{ display:flex; align-items:center; gap:10px; }
.topbar-search{
  display:flex; align-items:center; gap:6px;
  background: #1c1c1c;
  border: 1px solid #444;
  padding: 4px 8px;
  border-radius: 999px;
}
.topbar-search input{
  width: 180px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--txt-0);
  font-size: 12px;
}
.icon-btn{
  width: 26px; height: 26px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}
.icon-btn:hover{ background: rgba(255,255,255,.12); }
.icon-search{
  display:block; width: 12px; height: 12px; margin: 0 auto;
  border: 2px solid #bbb; border-radius: 50%;
  position: relative;
}
.icon-search::after{
  content:"";
  position:absolute;
  width: 7px; height: 2px;
  background:#bbb;
  right:-6px; bottom:-2px;
  transform: rotate(45deg);
}

.pill-btn{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.35);
  color: #cfe2ff;
}
.pill-btn:hover{ text-decoration:none; background: rgba(59,130,246,.18); }

/* ===== Workarea: 3 Panels ===== */
.ai-workarea{
  display:grid;
  grid-template-columns: 56px 1fr 320px;
  min-height: 0;
}

/* Left tools */
.ai-tools{
  background: var(--ui-1);
  border-right: 1px solid var(--ui-3);
  padding: 10px 8px;
  display:flex;
  flex-direction: column;
  gap: 8px;
  align-items:center;
}
.tool{
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #242424;
  border: 1px solid #3f3f3f;
  cursor:pointer;
  position: relative;
}
.tool:hover{ background: #2a2a2a; }
.tool.is-active{
  outline: 2px solid rgba(59,130,246,.55);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35) inset;
}
.tool-ico{
  display:block;
  width: 18px; height: 18px;
  margin: 0 auto;
  margin-top: 10px;
  border-radius: 4px;
  background: linear-gradient(#777,#444);
  opacity: .9;
}
.tool-swatch{
  display:block; width: 18px; height: 18px; margin: 0 auto; margin-top: 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #111 0 50%, #ffffff 50% 100%);
  border: 1px solid #555;
}
.tools-divider{
  width: 36px; height: 1px; background: #444; margin: 6px 0;
}

/* Center canvas */
.ai-canvas{
  background: #3a3a3a;
  min-height: 0;
  overflow: auto;
}
.canvas-inner{
  padding: 22px;
  min-height: 100%;
  display:flex;
  justify-content:center;
}
.artboard{
  width: min(980px, 100%);
  background: #f8f8f8;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.25);
}
.artboard-header{
  display:flex;
  gap: 6px;
  padding: 8px 10px;
  background: #efefef;
  border-bottom: 1px solid #ddd;
}
.tab{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #e6e6e6;
  color: #444;
}
.tab.is-active{
  background: #ffffff;
  border: 1px solid #d7d7d7;
}
.artboard-body{
  padding: 26px 26px 34px;
  color: #222;
}

/* Content styles (inside artboard) */
.t-header{ margin-bottom: 16px; }
.t-title{
  margin: 0;
  font-size: 18px;
  color: #111;
  display:flex;
  gap: 8px;
  align-items: baseline;
}
.t-title-sub{ color:#666; font-size: 13px; }

.post-card{
  padding: 18px 18px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
}
.post-link:hover{ text-decoration:none; }
.post-meta{
  font-size: 12px;
  color: #666;
  display:flex;
  gap: 8px;
  align-items:center;
}
.post-cate{ color: #2563eb; }
.post-dot{ color: #bbb; }
.post-title{
  margin: 8px 0 6px;
  font-size: 20px;
  color: #111;
}
.post-desc{
  margin: 0;
  color:#444;
  line-height: 1.6;
}

.post-view .view-header{
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}
.view-meta{
  font-size: 12px;
  color: #666;
  display:flex; gap:8px; align-items:center;
}
.view-cate{ color:#2563eb; }
.view-title{
  margin: 10px 0 0;
  font-size: 32px;
  line-height: 1.2;
  color:#111;
}
.view-body{
  font-size: 16px;
  line-height: 1.75;
  color:#222;
}
.view-body a{ color:#2563eb; }

.tag-row{
  margin-top: 18px;
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.tag-label{
  font-size: 12px;
  font-weight: 700;
  color:#666;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
.tag-items a{
  display:inline-block;
  margin: 0 8px 8px 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color:#444;
  font-size: 12px;
}
.tag-items a:hover{ text-decoration:none; border-color:#cbd5e1; }

.tag-cloud{
  list-style:none; padding:0; margin: 0;
  display:flex; flex-wrap: wrap; gap: 8px;
}
.tag-pill{
  display:inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color:#1d4ed8;
  font-size: 12px;
}
.tag-pill:hover{ text-decoration:none; background:#dbeafe; }

.pager{
  margin-top: 22px;
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
}
.pager-btn{
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color:#111;
}
.pager-btn:hover{ text-decoration:none; border-color:#cbd5e1; }
.pager-pages{ display:flex; gap: 6px; flex-wrap: wrap; justify-content:center; }
.pager-page{
  min-width: 34px;
  text-align:center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background:#fff;
  color:#111;
}
.pager-page.selected{
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.35);
  color:#1d4ed8;
}

/* Right properties */
.ai-props{
  background: var(--ui-1);
  border-left: 1px solid var(--ui-3);
  min-height: 0;
  overflow:auto;
  padding: 12px;
}
.panel{
  background: #242424;
  border: 1px solid #3f3f3f;
  border-radius: 12px;
  overflow:hidden;
}
.panel-title{
  padding: 10px 12px;
  font-size: 12px;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #d7d7d7;
  background: linear-gradient(#2f2f2f,#262626);
  border-bottom: 1px solid #3b3b3b;
}
.panel-block{
  padding: 12px;
  border-top: 1px solid #303030;
}
.panel-block:first-of-type{ border-top: 0; }
.panel-label{
  font-size: 11px;
  color: #a7a7a7;
  margin-bottom: 10px;
}
.kv{
  display:grid;
  grid-template-columns: 78px 1fr;
  gap: 8px 10px;
  font-size: 12px;
}
.k{ color:#9b9b9b; }
.v{ color:#e7e7e7; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.v a{ color:#93c5fd; }

.mini-list{
  background:#1c1c1c;
  border: 1px solid #343434;
  border-radius: 10px;
  padding: 10px;
}
.mini-head{
  font-size: 11px;
  color:#bdbdbd;
  margin-bottom: 8px;
}
.mini-body{
  font-size: 12px;
  color:#dcdcdc;
}
.mini-body a{ color:#dcdcdc; }
.mini-body a:hover{ color:#fff; }
.mini-link{
  display:inline-block;
  margin-top: 10px;
  font-size: 12px;
  color:#93c5fd;
}

.quick-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.quick{
  display:block;
  text-align:center;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid #3b3b3b;
  background: #1c1c1c;
  font-size: 12px;
  color:#e7e7e7;
}
.quick:hover{ text-decoration:none; border-color: rgba(59,130,246,.45); }

/* Statusbar */
.ai-statusbar{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 0 10px;
  background: #242424;
  border-top: 1px solid var(--ui-3);
  color: #bdbdbd;
  font-size: 12px;
}
.ai-statusbar .dot{ margin: 0 8px; color:#666; }

/* Responsive */
/* @media (max-width: 980px){
  .ai-workarea{ grid-template-columns: 56px 1fr; }
  .ai-props{ display:none; }
}
@media (max-width: 640px){
  .topbar-menu{ display:none; }
  .topbar-search input{ width: 120px; }
  .artboard-body{ padding: 18px; }
  .view-title{ font-size: 26px; }
} */

/* =========================
   Responsive Layout Upgrade
   ========================= */

/* 기본(PC): 56 / 1fr / 320 유지 */

/* 1) 큰 태블릿~작은 노트북: 오른쪽 패널 좁히고, 아트보드 패딩 줄이기 */
@media (max-width: 1200px){
  .ai-workarea{ grid-template-columns: 56px 1fr 280px; }
  .canvas-inner{ padding: 16px; }
  .artboard-body{ padding: 22px; }
}

/* 2) 태블릿: 오른쪽 패널을 아래로 내려 "도킹 패널"처럼 */
@media (max-width: 980px){
  .ai-workarea{
    grid-template-columns: 56px 1fr;
    grid-template-rows: 1fr auto;
  }

  .ai-canvas{
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .ai-props{
    display: block;
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    border-left: 0;
    border-top: 1px solid var(--ui-3);
    padding: 10px;
    max-height: 44vh;            /* 패널이 화면 다 먹지 않게 */
  }

  .panel{ border-radius: 14px; }
  .panel-title{ position: sticky; top: 0; z-index: 2; } /* 도킹 느낌 */
}

/* 3) 모바일: 툴바를 하단으로 이동 + 상단 메뉴/검색 간소화 */
@media (max-width: 640px){
  /* Topbar 정리 */
  .topbar-menu{ display:none; }
  .topbar-center{ display:none; } /* 제목은 모바일에서 공간 너무 먹음 */
  .topbar-search input{ width: 110px; }

  /* Workarea를 세로 스택으로 */
  .ai-workarea{
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto;
  }

  /* 캔버스가 1순위 */
  .ai-canvas{
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  /* 속성 패널은 캔버스 아래 도킹 */
  .ai-props{
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    max-height: 40vh;
  }

  /* 왼쪽 툴바 -> 하단 툴바 */
  .ai-tools{
    grid-column: 1 / 2;
    grid-row: 3 / 4;

    flex-direction: row;
    justify-content: space-between;
    gap: 8px;

    padding: 10px;
    border-right: 0;
    border-top: 1px solid var(--ui-3);
  }

  .tool{
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex: 0 0 auto;
  }

  .tools-divider{
    width: 1px;
    height: 32px;
    margin: 0 4px;
  }

  /* 아트보드 여백 줄이기 */
  .canvas-inner{ padding: 12px; }
  .artboard{ border-radius: 12px; }
  .artboard-body{ padding: 16px; }

  .view-title{ font-size: 24px; }
}

/* 4) 아주 작은 모바일: 검색 숨기고 상태바 텍스트 축약 */
@media (max-width: 420px){
  .topbar-search{ display:none; }
  .ai-statusbar .mode{ display:none; }
  .ai-statusbar .zoom{ display:none; }
}

/* =========================
   Home (index) = Intro only
   ========================= */

/* 기본은 숨김 */
.home-intro{ display:none; }

/* 홈에서만 보여주기 */
#tt-body-index .home-intro{
  display:block;
  padding: 26px;
  border-radius: 14px;
  border: 1px solid #e6e6e6;
  background: #fff;
  color: #111;
}

/* 홈에서는 글 리스트/목록 UI 숨기기 */
#tt-body-index .post-card,
#tt-body-index .t-header,
#tt-body-index .pager{
  display:none !important;
}

/* 홈에서 permalink 글(본문)은 원래 안 뜨지만 안전빵으로 */
#tt-body-index .post-view{
  display:none !important;
}

@charset "UTF-8";

/* ===== Base Reset (가볍게) ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Pretendard", "Noto Sans KR", Arial, sans-serif;
  background: #2b2b2b;
  color: #e7e7e7;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); border:0;
}

/* ===== Theme Tokens (Illustrator-ish) ===== */
:root{
  --ui-0: #1f1f1f;   /* deepest */
  --ui-1: #2a2a2a;   /* panel */
  --ui-2: #333333;   /* raised */
  --ui-3: #3c3c3c;   /* borders */
  --txt-0:#f3f3f3;
  --txt-1:#cfcfcf;
  --txt-2:#9b9b9b;
  --accent:#3b82f6;

  --shadow: 0 10px 25px rgba(0,0,0,.35);
  --radius: 10px;
}

/* ===== App Layout ===== */
.ai-app{
  min-height: 100%;
  display: grid;
  grid-template-rows: 44px 1fr 28px;
}

/* ===== Topbar ===== */
.ai-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 0 12px;
  background: linear-gradient(#2e2e2e, #262626);
  border-bottom: 1px solid var(--ui-3);
}
.topbar-left{ display:flex; align-items:center; gap:12px; }
.app-badge{ display:flex; gap:8px; align-items:center; padding: 0 6px; }
.app-badge-dot{
  width: 10px; height: 10px; border-radius: 50%;
  background: #111;
  box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #444;
}
.topbar-menu{ display:flex; gap:10px; align-items:center; }
.menu-item{
  font-size: 12px;
  color: var(--txt-1);
  padding: 6px 8px;
  border-radius: 6px;
}
.menu-item:hover{
  background: rgba(255,255,255,.06);
  text-decoration: none;
}

.topbar-center{ flex: 1; display:flex; justify-content:center; }
.doc-title{
  font-size: 12px;
  color: var(--txt-2);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.doc-name{ color: var(--txt-0); }
.doc-sep{ margin: 0 6px; color: #666; }

.topbar-right{ display:flex; align-items:center; gap:10px; }
.topbar-search{
  display:flex; align-items:center; gap:6px;
  background: #1c1c1c;
  border: 1px solid #444;
  padding: 4px 8px;
  border-radius: 999px;
}
.topbar-search input{
  width: 180px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--txt-0);
  font-size: 12px;
}
.icon-btn{
  width: 26px; height: 26px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.06);
  cursor: pointer;
}
.icon-btn:hover{ background: rgba(255,255,255,.12); }
.icon-search{
  display:block; width: 12px; height: 12px; margin: 0 auto;
  border: 2px solid #bbb; border-radius: 50%;
  position: relative;
}
.icon-search::after{
  content:"";
  position:absolute;
  width: 7px; height: 2px;
  background:#bbb;
  right:-6px; bottom:-2px;
  transform: rotate(45deg);
}

.pill-btn{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.35);
  color: #cfe2ff;
}
.pill-btn:hover{ text-decoration:none; background: rgba(59,130,246,.18); }

/* ===== Workarea: 3 Panels ===== */
.ai-workarea{
  display:grid;
  grid-template-columns: 56px 1fr 320px;
  min-height: 0;
}

/* Left tools */
.ai-tools{
  background: var(--ui-1);
  border-right: 1px solid var(--ui-3);
  padding: 10px 8px;
  display:flex;
  flex-direction: column;
  gap: 8px;
  align-items:center;
}
.tool{
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #242424;
  border: 1px solid #3f3f3f;
  cursor:pointer;
  position: relative;
}
.tool:hover{ background: #2a2a2a; }
.tool.is-active{
  outline: 2px solid rgba(59,130,246,.55);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35) inset;
}
.tool-ico{
  display:block;
  width: 18px; height: 18px;
  margin: 0 auto;
  margin-top: 10px;
  border-radius: 4px;
  background: linear-gradient(#777,#444);
  opacity: .9;
}
.tool-swatch{
  display:block; width: 18px; height: 18px; margin: 0 auto; margin-top: 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #111 0 50%, #ffffff 50% 100%);
  border: 1px solid #555;
}
.tools-divider{
  width: 36px; height: 1px; background: #444; margin: 6px 0;
}

/* Center canvas */
.ai-canvas{
  background: #3a3a3a;
  min-height: 0;
  overflow: auto;
}
.canvas-inner{
  padding: 22px;
  min-height: 100%;
  display:flex;
  justify-content:center;
}
.artboard{
  width: min(980px, 100%);
  background: #f8f8f8;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.25);
}
.artboard-header{
  display:flex;
  gap: 6px;
  padding: 8px 10px;
  background: #efefef;
  border-bottom: 1px solid #ddd;
}
.tab{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #e6e6e6;
  color: #444;
}
.tab.is-active{
  background: #ffffff;
  border: 1px solid #d7d7d7;
}
.artboard-body{
  padding: 26px 26px 34px;
  color: #222;
}

/* Content styles (inside artboard) */
.t-header{ margin-bottom: 16px; }
.t-title{
  margin: 0;
  font-size: 18px;
  color: #111;
  display:flex;
  gap: 8px;
  align-items: baseline;
}
.t-title-sub{ color:#666; font-size: 13px; }

.post-card{
  padding: 18px 18px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
}
.post-link:hover{ text-decoration:none; }
.post-meta{
  font-size: 12px;
  color: #666;
  display:flex;
  gap: 8px;
  align-items:center;
}
.post-cate{ color: #2563eb; }
.post-dot{ color: #bbb; }
.post-title{
  margin: 8px 0 6px;
  font-size: 20px;
  color: #111;
}
.post-desc{
  margin: 0;
  color:#444;
  line-height: 1.6;
}

.post-view .view-header{
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}
.view-meta{
  font-size: 12px;
  color: #666;
  display:flex; gap:8px; align-items:center;
}
.view-cate{ color:#2563eb; }
.view-title{
  margin: 10px 0 0;
  font-size: 32px;
  line-height: 1.2;
  color:#111;
}
.view-body{
  font-size: 16px;
  line-height: 1.75;
  color:#222;
}
.view-body a{ color:#2563eb; }

.tag-row{
  margin-top: 18px;
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.tag-label{
  font-size: 12px;
  font-weight: 700;
  color:#666;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
.tag-items a{
  display:inline-block;
  margin: 0 8px 8px 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color:#444;
  font-size: 12px;
}
.tag-items a:hover{ text-decoration:none; border-color:#cbd5e1; }

.tag-cloud{
  list-style:none; padding:0; margin: 0;
  display:flex; flex-wrap: wrap; gap: 8px;
}
.tag-pill{
  display:inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color:#1d4ed8;
  font-size: 12px;
}
.tag-pill:hover{ text-decoration:none; background:#dbeafe; }

.pager{
  margin-top: 22px;
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
}
.pager-btn{
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color:#111;
}
.pager-btn:hover{ text-decoration:none; border-color:#cbd5e1; }
.pager-pages{ display:flex; gap: 6px; flex-wrap: wrap; justify-content:center; }
.pager-page{
  min-width: 34px;
  text-align:center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background:#fff;
  color:#111;
}
.pager-page.selected{
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.35);
  color:#1d4ed8;
}

/* Right properties */
.ai-props{
  background: var(--ui-1);
  border-left: 1px solid var(--ui-3);
  min-height: 0;
  overflow:auto;
  padding: 12px;
}
.panel{
  background: #242424;
  border: 1px solid #3f3f3f;
  border-radius: 12px;
  overflow:hidden;
}
.panel-title{
  padding: 10px 12px;
  font-size: 12px;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #d7d7d7;
  background: linear-gradient(#2f2f2f,#262626);
  border-bottom: 1px solid #3b3b3b;
}
.panel-block{
  padding: 12px;
  border-top: 1px solid #303030;
}
.panel-block:first-of-type{ border-top: 0; }
.panel-label{
  font-size: 11px;
  color: #a7a7a7;
  margin-bottom: 10px;
}
.kv{
  display:grid;
  grid-template-columns: 78px 1fr;
  gap: 8px 10px;
  font-size: 12px;
}
.k{ color:#9b9b9b; }
.v{ color:#e7e7e7; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
.v a{ color:#93c5fd; }

.mini-list{
  background:#1c1c1c;
  border: 1px solid #343434;
  border-radius: 10px;
  padding: 10px;
}
.mini-head{
  font-size: 11px;
  color:#bdbdbd;
  margin-bottom: 8px;
}
.mini-body{
  font-size: 12px;
  color:#dcdcdc;
}
.mini-body a{ color:#dcdcdc; }
.mini-body a:hover{ color:#fff; }
.mini-link{
  display:inline-block;
  margin-top: 10px;
  font-size: 12px;
  color:#93c5fd;
}

.quick-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.quick{
  display:block;
  text-align:center;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid #3b3b3b;
  background: #1c1c1c;
  font-size: 12px;
  color:#e7e7e7;
}
.quick:hover{ text-decoration:none; border-color: rgba(59,130,246,.45); }

/* Statusbar */
.ai-statusbar{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 0 10px;
  background: #242424;
  border-top: 1px solid var(--ui-3);
  color: #bdbdbd;
  font-size: 12px;
}
.ai-statusbar .dot{ margin: 0 8px; color:#666; }

/* Responsive */
/* @media (max-width: 980px){
  .ai-workarea{ grid-template-columns: 56px 1fr; }
  .ai-props{ display:none; }
}
@media (max-width: 640px){
  .topbar-menu{ display:none; }
  .topbar-search input{ width: 120px; }
  .artboard-body{ padding: 18px; }
  .view-title{ font-size: 26px; }
} */

/* =========================
   Responsive Layout Upgrade
   ========================= */

/* 기본(PC): 56 / 1fr / 320 유지 */

/* 1) 큰 태블릿~작은 노트북: 오른쪽 패널 좁히고, 아트보드 패딩 줄이기 */
@media (max-width: 1200px){
  .ai-workarea{ grid-template-columns: 56px 1fr 280px; }
  .canvas-inner{ padding: 16px; }
  .artboard-body{ padding: 22px; }
}

/* 2) 태블릿: 오른쪽 패널을 아래로 내려 "도킹 패널"처럼 */
@media (max-width: 980px){
  .ai-workarea{
    grid-template-columns: 56px 1fr;
    grid-template-rows: 1fr auto;
  }

  .ai-canvas{
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .ai-props{
    display: block;
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    border-left: 0;
    border-top: 1px solid var(--ui-3);
    padding: 10px;
    max-height: 44vh;            /* 패널이 화면 다 먹지 않게 */
  }

  .panel{ border-radius: 14px; }
  .panel-title{ position: sticky; top: 0; z-index: 2; } /* 도킹 느낌 */
}

/* 3) 모바일: 툴바를 하단으로 이동 + 상단 메뉴/검색 간소화 */
@media (max-width: 640px){
  /* Topbar 정리 */
  .topbar-menu{ display:none; }
  .topbar-center{ display:none; } /* 제목은 모바일에서 공간 너무 먹음 */
  .topbar-search input{ width: 110px; }

  /* Workarea를 세로 스택으로 */
  .ai-workarea{
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto;
  }

  /* 캔버스가 1순위 */
  .ai-canvas{
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  /* 속성 패널은 캔버스 아래 도킹 */
  .ai-props{
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    max-height: 40vh;
  }

  /* 왼쪽 툴바 -> 하단 툴바 */
  .ai-tools{
    grid-column: 1 / 2;
    grid-row: 3 / 4;

    flex-direction: row;
    justify-content: space-between;
    gap: 8px;

    padding: 10px;
    border-right: 0;
    border-top: 1px solid var(--ui-3);
  }

  .tool{
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex: 0 0 auto;
  }

  .tools-divider{
    width: 1px;
    height: 32px;
    margin: 0 4px;
  }

  /* 아트보드 여백 줄이기 */
  .canvas-inner{ padding: 12px; }
  .artboard{ border-radius: 12px; }
  .artboard-body{ padding: 16px; }

  .view-title{ font-size: 24px; }
}

/* 4) 아주 작은 모바일: 검색 숨기고 상태바 텍스트 축약 */
@media (max-width: 420px){
  .topbar-search{ display:none; }
  .ai-statusbar .mode{ display:none; }
  .ai-statusbar .zoom{ display:none; }
}

/* =========================
   Home (index) = Intro only
   ========================= */

/* 기본은 숨김 */
.home-intro{ display:none; }

/* 홈에서만 보여주기 */
#tt-body-index .home-intro{
  display:block;
  padding: 26px;
  border-radius: 14px;
  border: 1px solid #e6e6e6;
  background: #fff;
  color: #111;
}

/* 홈에서는 글 리스트/목록 UI 숨기기 */
#tt-body-index .post-card,
#tt-body-index .t-header,
#tt-body-index .pager{
  display:none !important;
}

/* 홈에서 permalink 글(본문)은 원래 안 뜨지만 안전빵으로 */
#tt-body-index .post-view{
  display:none !important;
}

/* ===== Right Dock (Illustrator-like) ===== */
.ai-props{ padding: 10px; background: #2a2a2a; }

.dock{ display:flex; flex-direction:column; gap: 10px; }

.dock-tabs{
  display:flex; gap: 8px;
  padding: 6px 6px;
  background:#242424;
  border:1px solid #3f3f3f;
  border-radius: 10px;
}
.dock-tab{
  width: 26px; height: 26px; border-radius: 7px;
  border:1px solid #3a3a3a;
  background: #1c1c1c;
  cursor:pointer;
}
.dock-tab.is-active{
  outline: 2px solid rgba(59,130,246,.55);
  background: #232323;
}

.ai-panel{
  background:#242424;
  border:1px solid #3f3f3f;
  border-radius: 12px;
  overflow:hidden;
}
.panel-hd{
  display:flex; align-items:center; justify-content:space-between;
  padding: 8px 10px;
  background: linear-gradient(#2f2f2f,#262626);
  border-bottom:1px solid #3b3b3b;
}
.panel-title{
  font-size: 12px; color:#ddd;
  letter-spacing:.2px;
}
.panel-actions{ display:flex; gap:6px; }
.mini-ico{
  width: 14px; height: 14px; border-radius: 4px;
  background: #1c1c1c; border:1px solid #3b3b3b;
}
.panel-bd{ padding: 10px; }

/* ===== Color panel visual (최근색 + CMYK) ===== */
.recent-colors{
  display:flex; gap:6px; flex-wrap:wrap;
  padding: 6px;
  background:#1c1c1c;
  border:1px solid #343434;
  border-radius: 10px;
  margin-bottom: 10px;
}
.sw{ width: 16px; height: 10px; border-radius: 2px; border:1px solid #555; }
.sw-1{background:#111;} .sw-2{background:#fff;}
.sw-3{background:#6b7280;} .sw-4{background:#ef4444;}
.sw-5{background:#f59e0b;} .sw-6{background:#22c55e;}
.sw-7{background:#3b82f6;} .sw-8{background:#a855f7;}

.color-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom: 10px; }
.fillstroke{ position:relative; width: 44px; height: 34px; }
.fs{
  position:absolute; width: 22px; height: 22px; border-radius: 4px;
  border:1px solid #555;
}
.fs-fill{ left:0; top:0; background:#ffffff; }
.fs-stroke{ right:0; bottom:0; background:#111111; box-shadow: inset 0 0 0 2px #fff; }
.mode{ display:flex; gap:10px; }
.mode-label{ font-size: 11px; color:#a7a7a7; }

.cmyk{ display:flex; flex-direction:column; gap:8px; margin-bottom: 10px; }
.cmyk-r{ display:grid; grid-template-columns: 14px 1fr 40px; align-items:center; gap:8px; }
.cmyk-l{ font-size: 11px; color:#a7a7a7; }
.cmyk-v{ font-size: 11px; color:#bdbdbd; text-align:right; }
.cmyk-s{ width:100%; accent-color: #9ca3af; }
.cmyk-s.c{ accent-color:#22d3ee; }
.cmyk-s.m{ accent-color:#f472b6; }
.cmyk-s.y{ accent-color:#facc15; }
.cmyk-s.k{ accent-color:#d1d5db; }

.hex-row{
  display:grid; grid-template-columns: 14px 1fr 34px;
  align-items:center; gap:8px;
  margin-bottom: 10px;
}
.hex-label{ font-size: 11px; color:#a7a7a7; }
.hex-input{
  height: 30px;
  border-radius: 10px;
  border:1px solid #3b3b3b;
  background:#1c1c1c;
  color:#e7e7e7;
  padding: 0 10px;
  font-size: 12px;
}
.hex-preview{
  width: 34px; height: 30px;
  border-radius: 10px;
  border:1px solid #3b3b3b;
  background:#ffffff;
}

.color-field{
  height: 120px;
  border-radius: 10px;
  border:1px solid #343434;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0)),
              linear-gradient(0deg, #000, rgba(0,0,0,0)),
              linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  position:relative;
  margin-bottom: 10px;
}
.color-handle{
  position:absolute; width: 10px; height: 10px; border-radius: 999px;
  border:2px solid #fff; box-shadow: 0 0 0 1px #000;
  left: 70%; top: 35%;
}
.color-hue{
  height: 12px;
  border-radius: 999px;
  border:1px solid #343434;
  background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  position:relative;
  margin-bottom: 12px;
}
.hue-handle{
  position:absolute; width: 10px; height: 18px; border-radius: 6px;
  border:2px solid #fff; box-shadow: 0 0 0 1px #000;
  left: 52%; top: -3px;
}

/* 실제 적용 컨트롤(작게, 툴 느낌) */
.apply-grid{ display:flex; flex-direction:column; gap:8px; }
.apply-row{ display:grid; grid-template-columns: 70px 1fr; align-items:center; gap:10px; }
.apply-name{ font-size: 11px; color:#a7a7a7; }
.apply-color{ width:100%; height: 30px; border-radius:10px; border:1px solid #3b3b3b; background:#1c1c1c; }
.apply-select{
  width:100%; height: 32px;
  border-radius:10px; border:1px solid #3b3b3b;
  background:#1c1c1c; color:#e7e7e7;
  padding: 0 10px; font-size: 12px;
}

/* ===== Layers panel (눈/계층/선택 강조) ===== */
.layers-head{ margin-bottom: 8px; }
.layers-search{
  width:100%; height: 32px;
  border-radius: 10px;
  border:1px solid #3b3b3b;
  background:#1c1c1c;
  color:#e7e7e7;
  padding: 0 10px;
  font-size: 12px;
}

.layers-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:6px; }
.layer-item{
  display:grid;
  grid-template-columns: 26px 16px 1fr;
  align-items:center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  color:#ddd;
  font-size: 12px;
}
.layer-item.is-active{
  border-color: rgba(59,130,246,.4);
  background: rgba(59,130,246,.12);
}
.eye{
  width: 26px; height: 20px;
  border-radius: 8px;
  border:1px solid #3b3b3b;
  background:#1c1c1c;
  position:relative;
  cursor:pointer;
}
.eye::before{
  content:"";
  position:absolute; left:50%; top:50%;
  width: 12px; height: 8px;
  border:2px solid #bdbdbd;
  border-radius: 999px;
  transform: translate(-50%,-50%);
}
.eye::after{
  content:"";
  position:absolute; left:50%; top:50%;
  width: 4px; height: 4px;
  background:#bdbdbd;
  border-radius: 999px;
  transform: translate(-50%,-50%);
}

.twisty{
  width: 0; height: 0;
  border-left: 6px solid #bdbdbd;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  opacity: .9;
}
.layer-bullet{
  width: 6px; height: 6px; border-radius: 2px;
  background:#9b9b9b;
}

.layer-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.layer-link{ color:#ddd; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:block; }
.layer-link:hover{ text-decoration:none; color:#fff; }

.layer-children{ padding-left: 14px; }
.layers-sub{ list-style:none; padding:0; margin:6px 0 2px; display:flex; flex-direction:column; gap:6px; }

.layers-box{
  padding: 8px 10px;
  border-radius: 10px;
  border:1px solid #343434;
  background:#1c1c1c;
  color:#ddd;
  font-size: 12px;
}
.layers-box a{ color:#ddd; }
.layers-box a:hover{ color:#fff; text-decoration:none; }

.layers-tags{ padding: 8px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.tag-chip{
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color:#e7e7e7;
}
.tag-more{ margin-left:auto; font-size: 11px; color:#93c5fd; align-self:center; }
.layer-cnt{ color:#9b9b9b; }

/* 실제 본문 적용은 그대로 유지 */
.artboard-body{ background: var(--post-bg, #fff); color: var(--post-text, #111); font-family: var(--post-font, inherit); }
.artboard-body a{ color: var(--accent, #3b82f6); }

/* 접히면 하위(ul/div 상관없이) 숨김 */
.layer-children.is-collapsed{
  display: none;
}

/* 숨김 상태 스타일 */
.layer-item.is-hidden {
  opacity: 0.4;
}

.layer-children.is-hidden {
  display: none;
}

/* eye 버튼 숨김 상태 */
.eye.is-hidden::before,
.eye.is-hidden::after {
  border-color: #666;
  opacity: 0.5;
}

.eye.is-hidden::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 20px;
  height: 2px;
  background: #666;
  transform: translateY(-50%) rotate(-45deg);
  border: none;
  border-radius: 0;
}

/* 삼각형 회전(펼침/접힘 표시) */
.layer-item .twisty{
  transition: transform .15s ease;
}
.layer-item.is-collapsed .twisty{
  transform: rotate(-90deg);
}

/* 그룹 행은 클릭 가능한 느낌 */
.layer-item[data-target]{
  cursor: pointer;
}
.layer-item[data-target]:hover{
  border-color: rgba(59,130,246,.28);
}

.layers-sub.is-collapsed{
  display: none;
}

.layers-sub.is-hidden { display: none; }

/* ===== Color panel (최근색 + RGB + HEX + 팔레트) ===== */

/* 최근 색상: span -> button으로 쓰기 좋게 */
.recent-colors{
  display:flex; gap:6px; flex-wrap:wrap;
  padding: 6px;
  background:#1c1c1c;
  border:1px solid #343434;
  border-radius: 10px;
  margin-bottom: 10px;
}
.recent-colors .sw{
  width: 18px; height: 14px;
  border-radius: 4px;
  border:1px solid #555;
  background: var(--c, #fff);
  cursor:pointer;
}
.recent-colors .sw.is-active{
  outline: 2px solid rgba(59,130,246,.55);
  outline-offset: 1px;
}

/* HEX row(기존 유지하되 preview와 함께) */
.hex-row{
  display:grid; grid-template-columns: 14px 1fr 34px;
  align-items:center; gap:8px;
  margin-bottom: 10px;
}
.hex-label{ font-size: 11px; color:#a7a7a7; }
.hex-input{
  height: 30px;
  border-radius: 10px;
  border:1px solid #3b3b3b;
  background:#1c1c1c;
  color:#e7e7e7;
  padding: 0 10px;
  font-size: 12px;
}
.hex-preview{
  width: 34px; height: 30px;
  border-radius: 10px;
  border:1px solid #3b3b3b;
  background:#ffffff;
}

/* RGB */
.rgb-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.rgb-item{
  display:grid;
  grid-template-columns: 16px 1fr;
  align-items:center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #3b3b3b;
  background: #1c1c1c;
}
.rgb-l{
  font-size: 11px;
  color:#a7a7a7;
}
.rgb-in{
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color:#e7e7e7;
  font-size: 12px;
  text-align: right;
}
.rgb-in::-webkit-outer-spin-button,
.rgb-in::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

/* 팔레트 */
.palette{
  display:grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  border:1px solid #343434;
  background:#1c1c1c;
}
.pal{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 1px solid #3b3b3b;
  background: var(--c, #fff);
  cursor:pointer;
}
.pal.is-active{
  outline: 2px solid rgba(59,130,246,.55);
  outline-offset: 1px;
}

/* 팔레트가 너무 좁아질 때 */
@media (max-width: 420px){
  .palette{ grid-template-columns: repeat(8, 1fr); }
}

/* CMYK -> RGB (형태 유지) */
.rgb{ display:flex; flex-direction:column; gap:8px; margin-bottom: 10px; }
.rgb-r{ display:grid; grid-template-columns: 14px 1fr 40px; align-items:center; gap:8px; }
.rgb-l{ font-size: 11px; color:#a7a7a7; }
.rgb-v{ font-size: 11px; color:#bdbdbd; text-align:right; }

.rgb-s{ width:100%; accent-color:#9ca3af; }
.rgb-s.r{ accent-color:#ef4444; }
.rgb-s.g{ accent-color:#22c55e; }
.rgb-s.b{ accent-color:#3b82f6; }

/* 최근 색상: 기존 span(.sw) 클릭 가능하게 */
.recent-colors .sw{
  width: 16px; height: 10px;
  border-radius: 2px;
  border:1px solid #555;
  background: var(--c, #fff);
  cursor:pointer;
  padding: 0;
}
.recent-colors .sw.is-active{
  outline: 2px solid rgba(59,130,246,.55);
  outline-offset: 1px;
}

/* 팔레트 */
.palette{
  display:grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  border:1px solid #343434;
  background:#1c1c1c;
  margin-bottom: 10px;
}
.pal{
  width:100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border:1px solid #3b3b3b;
  background: var(--c, #fff);
  cursor:pointer;
  padding: 0;
}
.pal.is-active{
  outline: 2px solid rgba(59,130,246,.55);
  outline-offset: 1px;
}

.recent-colors .sw{
  width: 16px;
  height: 10px;
  border-radius: 2px;
  border:1px solid #555;
  padding: 0;
  background: var(--c, #fff);
  cursor: pointer;
}
.recent-colors .sw.is-active{
  outline: 2px solid rgba(59,130,246,.55);
  outline-offset: 1px;
}

.rgb{ display:flex; flex-direction:column; gap:8px; margin-bottom: 10px; }
.rgb-r{
  display:grid;
  grid-template-columns: 14px 1fr 52px;
  align-items:center;
  gap:8px;
}
.rgb-l{ font-size: 11px; color:#a7a7a7; }
.rgb-s{ width:100%; accent-color: #9ca3af; }
.rgb-s.r{ accent-color:#ef4444; }
.rgb-s.g{ accent-color:#22c55e; }
.rgb-s.b{ accent-color:#3b82f6; }

.rgb-num{
  height: 22px;
  border-radius: 6px;
  border:1px solid #3b3b3b;
  background:#1c1c1c;
  color:#e7e7e7;
  padding: 0 8px;
  font-size: 12px;
  text-align: right;
}
.rgb-num::-webkit-outer-spin-button,
.rgb-num::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

.color-field{
  height: 120px;
  border-radius: 10px;
  border:1px solid #343434;
  position: relative;
  margin-bottom: 10px;

  /* base = 현재 hue 색 (JS가 --hue-color 갱신) */
  background:
    linear-gradient(90deg, #fff, rgba(255,255,255,0)),
    linear-gradient(0deg, #000, rgba(0,0,0,0)),
    var(--hue-color, #ff0000);
}
.color-handle{
  position:absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border:2px solid #fff;
  box-shadow: 0 0 0 1px #000;
  transform: translate(-6px, -6px);
  left: 0;
  top: 0;
}
