/* 홈 — 시안 v6.5(Main.dc.html, 2026-10-07 전면 교체).
   배경 성 그림 → 가운데 검색 → 클래스 열둘 → 인기 · 최신 · 내 빌드 세 열.
   ⚠ 폭은 머리말과 같은 공식(창 폭 − 양쪽 clamp(16px, 4.4%, 72px), 최대 1536px)이다 —
     시안에서 로고와 「클래스」 제목의 왼쪽 끝이 한 줄에 선다(skin.css `.bg3-header`).
   ⚠ 색은 전부 skin.css 토큰이다(tests/home-css.test.js 가 # 리터럴을 막는다). */
/* 홈의 큰 그림도 공통 배경과 같은 층에서 아래로 사라진다. */
body.bg3.home-v1 { --landscape-height: 820px; --landscape-position: 30%; --landscape-opacity: .6; --landscape-fade: 62%; }
.home-v1 .bg3-header, .home-v1 .bg3-main.homehub { position: relative; z-index: 1; }
.home-v1 .bg3-main.homehub {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .64fr);
  column-gap: 47px; row-gap: 0;
  width: min(calc(100% - 2 * clamp(16px, 4.4%, 72px)), 1536px); max-width: none;
  margin: 0 auto; padding: 0; box-sizing: border-box;
}
.homehub > .homesearch { grid-column: 1 / -1; grid-row: 1; }
.homehub > .homeclasses { grid-column: 1 / -1; grid-row: 2; }
.homehub > .homepopular-section { grid-column: 1; grid-row: 3; }
.homehub > .homelatest-section { grid-column: 2; grid-row: 3; }
.homehub > .homerail-mine { grid-column: 3; grid-row: 3; }
.homehub > .footnote { grid-column: 1 / -1; grid-row: 5; }
.home-v1 .homehub > .pane {
  min-width: 0; border: 0; border-image: none; border-radius: 0;
  background: transparent; box-shadow: none; padding: 0; margin: 0;
}
.home-v1 .homehub > .pane::before, .home-v1 .homehub > .pane::after { content: none; }

/* ── 가운데 검색 ── */
.home-v1 .homehub > .homesearch { display: flex; flex-direction: column; align-items: center; padding: 134px 0 0; text-align: center; }
.home-v1 .homeeyebrow { margin: 0 0 20px; color: var(--accent); font-size: var(--fs-sm); letter-spacing: .32em; }
body.bg3.home-v1 .homehero-title {
  margin: 0 0 30px; font: 500 clamp(36px, 5vw, 58px)/1.15 'BG3 EN', serif;
  letter-spacing: .06em; color: var(--text); text-shadow: 0 2px 14px rgba(0, 0, 0, .6);
  -webkit-text-fill-color: currentColor; background: none;
}
.home-v1 .homesearchform { width: 100%; max-width: 720px; }
.home-v1 .homesearchbox {
  position: relative; display: flex; align-items: center; gap: 12px;
  max-width: 720px; height: 58px; margin: auto; padding: 0 7px 0 20px; box-sizing: border-box;
  background: rgba(10, 8, 6, .45);
  border-top: 1px solid var(--text-3); border-bottom: 1px solid var(--text-3);
  transition: box-shadow .15s;
}
.home-v1 .homesearchbox:focus-within { box-shadow: 0 0 0 2px var(--accent), 0 0 18px rgba(200, 162, 76, .18); }
/* 위아래 금색 장식(시안의 마름모 + 짧은 선). 게임 자산이 있으면 그 그림을 쓴다. */
.home-v1 .homesearchbox::before, .home-v1 .homesearchbox::after {
  content: ''; position: absolute; left: 50%; width: 132px; height: 14px; margin-left: -66px;
  pointer-events: none; z-index: 2;
  background: url('./skin/Selected_Decor_Top.png') center / 132px 14px no-repeat;
}
.home-v1 .homesearchbox::before { top: -7px; }
.home-v1 .homesearchbox::after { bottom: -7px; transform: rotate(180deg); }
.home-v1 .homesearchicon { flex: none; width: 20px; height: 20px; color: var(--text-3); pointer-events: none; }
.home-v1 .homesearchbox #homeq {
  flex: 1; min-width: 0; width: 100%; height: 100%; box-sizing: border-box; padding: 0;
  background: transparent; border: 0; border-radius: 0; box-shadow: none; outline: none;
  color: var(--text); font: inherit; font-size: 16px;
}
.home-v1 .homesearchbox #homeq::placeholder { color: var(--text-2); opacity: 1; }
.home-v1 .homesearchbox #homeq::-webkit-search-cancel-button { display: none; }
.homesearch-clear {
  flex: none; min-width: var(--m-touch); min-height: var(--m-touch); padding: 0; border: 0; background: transparent;
  color: var(--text-2); font: inherit; font-size: 18px; cursor: pointer;
}
.homesearch-clear:hover { color: var(--accent); }
.homesearch-go {
  flex: none; min-height: var(--m-touch); padding: 0 16px; background: transparent;
  border: 1px solid var(--line-control); color: var(--text);
  font: inherit; font-size: var(--fs-nav); white-space: nowrap; cursor: pointer;
}
.homesearch-go:hover { border-color: var(--accent); color: var(--accent); }
.home-v1 #homecount { width: 100%; max-width: 720px; min-height: 18px; margin: 10px auto 0; color: var(--text-2); font-size: var(--fs-sm); text-align: left; }
.home-v1 .homeresults { width: 100%; max-width: 720px; margin: 4px auto 0; text-align: left; background: var(--surface-2); border: 1px solid var(--line-control); box-shadow: 0 10px 34px rgba(0, 0, 0, .67); }
.home-v1 .homeresults:empty { display: none; }
.home-v1 .homeresults li a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; color: var(--text); text-decoration: none; }
.home-v1 .homeresults li a:hover, .home-v1 .homeresults li a:focus-visible { background: var(--surface-3); color: var(--accent); }
.home-v1 #homemore { margin: 8px auto 0; }

/* ── 절 제목: 금색 낱자 간격 + 가는 선 ── */
.homeheading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
.homeheading > a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--accent); font-size: var(--fs-base); text-decoration: none; white-space: nowrap;
}
.homeheading > a:hover { color: var(--text); }
body.bg3.home-v1 .homehub .title {
  display: flex; align-items: center; gap: 16px; margin: 0 0 20px; padding: 0;
  font-family: var(--font-body); font-size: var(--fs-base); font-weight: 400;
  -webkit-text-fill-color: currentColor; letter-spacing: .28em; color: var(--accent);
  border: 0; background: none; text-shadow: none; text-align: left;
}
.home-v1 .homehub .title::after { content: ''; flex: 1; height: 1px; max-width: none; margin: 0; background: var(--line); }
.home-v1 .homeheading .title { flex: 1; margin: 0; }
.home-v1 .homeheading .title::after { content: none; }

/* ── 클래스 열둘 ── */
.home-v1 .homehub > .homeclasses { padding-top: 32px; }
.homeclasslist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 13px; }
.homeclasslist a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  height: 121px; padding: 8px 4px; box-sizing: border-box; text-decoration: none;
  background-color: rgba(6, 5, 3, .22); border: 1px solid var(--line-control);
  transition: border-color .15s, background-color .15s;
}
.homeclasslist a span { color: var(--accent); font-size: var(--fs-base); text-align: center; word-break: keep-all; white-space: nowrap; }
.homeclasslist a:hover { border-color: var(--text-3); background-color: rgba(42, 35, 25, .7); }
.homeclasslist a:hover span, .homeclasslist a:focus-visible span { color: var(--text); }
.homeclasslist a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.homeclasslist img { width: 56px; height: 56px; object-fit: contain; }

/* ── 인기 · 최신 · 내 빌드 ── */
.home-v1 .homehub > .homepopular-section,
.home-v1 .homehub > .homelatest-section,
.home-v1 .homehub > .homerail-mine { padding: 54px 0 64px; }
.home-v1 #homepopularnotice { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.homecards { display: grid; list-style: none; margin: 0; padding: 0; }
.home-v1 .homecards { gap: 0; grid-template-columns: minmax(0, 1fr); }
/* 빌드 한 줄(시안 `.brow`): 클래스 그림 42px · 제목 15px · 요약 12px · 작성자 줄. */
.home-v1 .homecards > li {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 10px;
  min-width: 0; padding: 19px 0 18px; border-bottom: 1px solid var(--line);
}
.home-v1 .homecard { display: contents; text-decoration: none; }
.home-v1 .homecard .clsicons { grid-column: 1; grid-row: 1 / span 3; display: flex; width: 42px; }
.home-v1 .homecard .clsico { width: 42px; height: 42px; }
.home-v1 .homecard .clsico:not(:first-child) { display: none; }
.hcinfo { display: flex; flex-direction: column; min-width: 0; }
.home-v1 .hcinfo { grid-column: 2; }
.homecard .hcname { color: var(--text); font-size: var(--fs-lg); }
.home-v1 .homecard .hcname { display: block; margin: 0 0 6px; font-family: var(--font-body); font-weight: 500; font-size: var(--fs-lg); line-height: 1.45; }
.home-v1 .homecard:hover .hcname { color: var(--accent); }
.homecard .hcmeta { color: var(--text-2); font-size: var(--fs-sm); }
.home-v1 .homecard .hcmeta { display: block; margin: 0 0 8px; line-height: 1.5; }
/* 작성자 · 시간 | 좋아요 · 조회 · 댓글. 아이콘과 다섯 자리 숫자를 담는 같은 폭의 칸을 쓴다. */
.hcauthor {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; color: var(--text-2); font-size: var(--fs-sm);
}
.home-v1 .hcauthor { grid-column: 2; padding: 0; }
.hcauthortext { flex: 1 1 100px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-v1 .hcauthor .authorlink { display: inline-flex; align-items: center; min-height: 28px; }
.hclikes { flex: none; margin-left: auto; display: grid; grid-template-columns: repeat(3, calc(18px + 5ch)); column-gap: 6px; justify-items: start; font-variant-numeric: tabular-nums; color: var(--text-2); }
.hclikes .hcstat { margin: 0; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.hclikes .hcstat:first-child { color: var(--text-3); }
/* 0·모름인 칸 — 자리만 남겨 행끼리 세로 줄을 맞춘다(community-stats.js `칸고정`). */
.hclikes .hcstat-empty { min-height: 1px; }
.hclikes .hcicon { width: 12px; height: 12px; flex: none; }
/* 내 빌드 이어가기 */
.homerail { display: flex; flex-direction: column; }
.home-v1 .homerail-mine .title { margin-bottom: 20px; }
.home-v1 #homemine { list-style: none; margin: 0; padding: 0; }
.home-v1 #homemine li { border-bottom: 1px solid var(--line); padding: 0; }
.homerail-mine .clouddocs li a { display: block; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-v1 #homemine li a {
  display: flex; align-items: center; min-height: 45px; box-sizing: border-box; padding: 0;
  color: var(--text); font-size: var(--fs-nav); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-v1 #homemine li a:hover { color: var(--accent); }
.home-v1 #homemine li.hint { display: block; padding: 12px 0; color: var(--text-2); line-height: 1.7; }
.home-v1 .homecreate {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; min-height: 44px; box-sizing: border-box;
  border: 1px solid var(--line-control); background: rgba(26, 21, 15, .8);
  color: var(--accent); font-size: var(--fs-nav); text-decoration: none;
}
.home-v1 .homecreate::before { content: '+'; font-size: 18px; line-height: 1; }
.home-v1 .homecreate:hover { background: var(--surface-3); border-color: var(--accent); }

/* 사이트 안내는 접어서 둔다. 도감 정적 주소·약관·출처는 계속 접근할 수 있다. */
.home-v1 .homehub > .footnote { grid-column: 1 / -1; padding: 0 0 24px; border: 0; background: none; display: block; }
.home-v1 .site-info { color: var(--text-2); font-size: var(--fs-sm); }
.home-v1 .site-info summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; }
.home-v1 .site-info :is(nav, .sf-community) { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.home-v1 .site-info a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); text-decoration: none; }
.home-v1 .site-info a:hover { color: var(--accent); }
.home-v1 .site-info .sf-meta { color: var(--text-3); text-align: left; }
.home-v1 .homecodex { display: flex; flex-wrap: wrap; gap: 0 24px; list-style: none; margin: 0; padding: 0; }
.home-v1 .homecodex .ti { margin-right: 6px; }
.home-v1 a:focus-visible, .home-v1 button:focus-visible, .home-v1 input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hdrfresh { margin: 0; font-size: var(--fs-sm); color: var(--text-2); letter-spacing: .04em; }

@media (max-width: 1100px) {
  .home-v1 .bg3-main.homehub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .homeclasslist { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .homehub > .homepopular-section { grid-column: 1; grid-row: 3; }
  .homehub > .homelatest-section { grid-column: 2; grid-row: 3; }
  .homehub > .homerail-mine { grid-column: 1 / -1; grid-row: 4; }
  .home-v1 .homehub > .homerail-mine { padding-top: 0; }
}
@media (max-width: 767px) {
  .home-v1 .bg3-main.homehub { display: flex; flex-direction: column; gap: 0; }
  .home-v1 .homehub > .pane { width: 100%; box-sizing: border-box; }
  .home-v1 .homehub > .homesearch { padding-top: 44px; }
  .home-v1 .homeeyebrow { font-size: 11.5px; letter-spacing: .16em; margin-bottom: 12px; }
  .home-v1 .homesearchbox { height: 54px; padding-left: 12px; gap: 8px; }
  .homeclasslist { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .homeclasslist a { height: 88px; gap: 4px; }
  .homeclasslist img { width: 44px; height: 44px; }
  .homeheading { margin-bottom: 20px; }
  .home-v1 .homehub > .homepopular-section { padding: 36px 0 0; }
  .home-v1 .homehub > .homelatest-section,
  .home-v1 .homehub > .homerail-mine { padding: 28px 0 0; }
  .home-v1 .hcauthor .authorlink { min-height: 44px; }
  .bg3-main.homehub > .footnote { order: 10; }
  .home-v1 .footnote { width: 100%; padding: 32px 0; }
}
/* 좁은 화면에서도 세 칸 폭을 유지한다. 작성자와 함께 놓을 수 없으면 묶음째 다음 줄에 둔다. */
@media (max-width: 620px) {
  .hclikes { column-gap: 2px; }
  .home-v1 .hcauthor { gap: 8px; }
}
