:root {
  /* 페이지 스크롤바(브라우저 기본 막대)를 어두운 판으로 그린다 */
  color-scheme: dark;
  --bg: oklch(0.14 0.006 270);
  --fg: oklch(0.98 0.005 120);
  --ink: oklch(0.14 0.006 270);
  --lime: oklch(0.9 0.22 128);
  --lime-hi: oklch(0.95 0.2 125);
  --paper: oklch(0.98 0.003 120);
  --orange: oklch(0.72 0.18 45);
  --coral: oklch(0.63 0.2 25);
  /* 포인트 색 밖의 하늘색: 메뉴 창 NEW 단추에만 쓴다 */
  --sky: oklch(0.79 0.1 237);
  /* 어두운 칸 */
  --tile: oklch(0.17 0.006 270);
  --tile-line: oklch(1 0 0 / 0.1);
  /* 누를 수 있는 것(카드·단추·탭·입력 칸)의 테두리는 모두 이 한 값이다. 점선 안내 상자도 같은 값이라 점선 무늬만큼 단추보다 옅어 보인다 */
  --btn-line: oklch(1 0 0 / 0.28);
  --tile-fg: oklch(0.96 0.004 270);
  --sub: oklch(0.72 0.006 270);
  /* 말풍선 색 */
  --card-ink: oklch(0.18 0.025 150);
  --mono: 'JetBrains Mono', monospace;
  --sys-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .3, 1);
}

html, body { margin: 0; background: var(--bg); word-break: keep-all; overflow-wrap: break-word; }
/* 페이지 스크롤바: 폭은 브라우저 기본, 손잡이는 흐린 회색, 바탕은 페이지 바탕색이라 바탕에 묻히는 평평한 막대가 된다(claude.dev와 같은 방식). 칸 안 목록은 저마다 얇은 막대를 따로 정한다 */
html { scrollbar-color: oklch(0.46 0.006 270) var(--bg); }
* { box-sizing: border-box; }
a { color: var(--card-ink); text-decoration: none; }
a:hover { color: oklch(0.45 0.14 142); }
button { -webkit-tap-highlight-color: transparent; }
input::placeholder { color: oklch(1 0 0 / 0.65); }

/* 픽셀 B: 칸은 script.js가 채운다 */
.pxb { display: grid; grid-template-columns: repeat(6, 1fr); }
.pxb > span { aspect-ratio: 1; }
.pxb.lime > .on { background: var(--lime); }
.pxb.paper > .on { background: var(--paper); }

/* 틀 */
.page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: Archivo, 'Pretendard Variable', Pretendard, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 8px clamp(14px, 3vw, 32px) 120px;
}
.wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }

/* 오른쪽 단추 끝은 아래 칸들의 오른쪽 끝선에 맞추고, 로고만 왼쪽에 2px 띄운다 */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 0 2px 2px; }
/* 로고 「BYOM²」: 정본은 `../../.00 로고 모음/ByomByom/SVG/`의 대문자 어두운 바탕용 */
.brand { display: flex; align-items: center; }
.brand img { display: block; height: 18.5px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
/* 머리 줄 단추: 글자 길이와 상관없이 폭 72px(Contact 원래 폭 71.4px에 맞춤)·높이 30px로 같고, 글자는 가운데에 둔다.
   Calendar는 테두리만(테두리 1px만큼 위아래 여백을 줄였다), Contact만 lime으로 채워 두드러지게 한다 */
.nav-link, .nav-contact { width: 72px; font: inherit; font-size: 12px; font-weight: 700; text-align: center; cursor: pointer; }
.nav-link { border: 1px solid var(--btn-line); background: transparent; color: var(--tile-fg); padding: 7px 0; transition: border-color .2s, color .2s; }
.nav-link:hover, .nav-link:focus-visible, .nav-link[aria-expanded="true"] { border-color: var(--lime); color: var(--lime); outline: none; }
.nav-contact { border: none; background: var(--lime); color: var(--ink); padding: 8px 0; }

.board { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
/* 맨 아래 저작권 줄: 오른쪽 아래 뵴과 겹치지 않게 왼쪽에 둔다. 줄 높이 12px는 한글(「공개」)이 섞여도 줄이 1px 커지지 않게 Archivo 한 줄 높이로 묶은 값이다 */
.foot { padding: 12px 2px 0; font-size: 11px; line-height: 12px; color: var(--sub); }
.col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tile { position: relative; }
.tile.dark { background: var(--tile); border: 1px solid var(--tile-line); color: var(--tile-fg); }
.tag {
  align-self: flex-start; padding: 2px 6px; background: var(--lime); color: var(--ink);
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
}
/* 흐르는 글: 칸보다 길면 script.js의 flowX()가 같은 글(.t2)을 하나 더 붙여 옆으로 흘린다. 오늘의 브리프와 GitHub 줄이 같이 쓴다 */
.flow {
  flex: 1; min-width: 0; overflow: hidden; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, black 88%, transparent); mask-image: linear-gradient(90deg, black 88%, transparent);
}
.flow-text { display: inline-flex; white-space: nowrap; }
.flow-text .t2 { display: none; padding-left: 24px; }

/* GitHub 활동 */
.t-gh { overflow: hidden; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.gh-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gh-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.gh-icon { flex-shrink: 0; fill: currentColor; }
.gh-link {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--lime); color: var(--ink);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.gh-link:hover { background: var(--lime-hi); color: var(--ink); }
.gh-grid {
  display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); grid-template-rows: repeat(7, auto);
  grid-auto-flow: column; gap: 3px;
}
.gh-grid > span { aspect-ratio: 1; transition: background-color .5s; }
.gh-grid > span[data-day] { cursor: pointer; }
.gh-grid > span[data-day]:hover { outline: 1px solid oklch(0.9 0.22 128 / 0.65); outline-offset: 1px; }
.gh-grid > span.on, .gh-grid > span.on:hover, .gh-grid > span[data-day]:focus-visible { outline: 1px solid var(--lime); outline-offset: 1px; }
/* 창을 연 칸은 이미 lime 선이라, 키보드 포커스가 있으면 선을 굵게 해 가른다 */
.gh-grid > span.on:focus-visible { outline-width: 2px; }
.gh-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--sub); }
.gh-total { white-space: nowrap; }
.gh-scale { display: flex; align-items: center; gap: 3px; }
.gh-scale i { width: 8px; height: 8px; }
.gh-scale i:nth-of-type(1) { background: oklch(1 0 0 / 0.07); }
.gh-scale i:nth-of-type(2) { background: oklch(0.9 0.22 128 / 0.35); }
.gh-scale i:nth-of-type(3) { background: oklch(0.9 0.22 128 / 0.65); }
.gh-scale i:nth-of-type(4) { background: var(--lime); }
.gh-recent, .gh-pop-rows { display: flex; flex-direction: column; border-top: 1px solid var(--tile-line); }
.gh-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid oklch(1 0 0 / 0.07); min-width: 0; }
.gh-kind {
  flex-shrink: 0; width: 54px; text-align: center; padding: 2px 0; background: var(--lime); color: var(--ink);
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
}
.gh-text { font-size: 13px; }
.gh-text b { font-weight: 700; }
.gh-msg, .gh-ago { color: var(--sub); }
.gh-ago { flex-shrink: 0; font-size: 11px; white-space: nowrap; }

/* 잔디 칸을 누르면 뜨는 작은 창: 풍경 칸과 같은 연두 테두리, 창 위에 작은 뵴이 앉고, 픽셀 꼬리가 누른 칸을 가리킨다 */
.gh-pop {
  position: absolute; width: min(300px, calc(100vw - 24px)); padding: 12px 14px 4px;
  background: var(--tile); color: var(--tile-fg); border: 1px solid oklch(0.9 0.22 128 / 0.35);
  box-shadow: 0 0 40px -10px oklch(0.9 0.22 128 / 0.35), 0 14px 28px -14px oklch(0 0 0 / 0.7);
}
.gh-pop[hidden] { display: none; }
/* 창은 GitHub 칸 안에 있으므로, 열린 동안에는 칸 밖으로 보이게 하고 옆 칸들보다 위에 둔다 */
.t-gh.pop-open { overflow: visible; z-index: 5; }
/* 작은 창 위에 앉는 뵴 그림(잔디 창·카드 창은 수리공, Contact 창·분류 창은 사서, 달력 창은 잠자는 뵴): 그림 아래 여백(그림자·빛 번짐 자리)만큼 창 테두리에 걸쳐 앉힌다 */
.gh-pop-buddy { position: absolute; right: 6px; bottom: calc(100% - 10px); width: auto; height: 45px; pointer-events: none; }
.gh-pop.mini-left .gh-pop-buddy { right: auto; left: 6px; }
.gh-pop-tail {
  position: absolute; top: -8px; width: 4px; height: 4px; background: oklch(0.9 0.22 128 / 0.35);
  box-shadow: -4px 4px 0 oklch(0.9 0.22 128 / 0.35), 0 4px 0 oklch(0.9 0.22 128 / 0.35), 4px 4px 0 oklch(0.9 0.22 128 / 0.35);
}
.gh-pop.up .gh-pop-tail {
  top: auto; bottom: -8px;
  box-shadow: -4px -4px 0 oklch(0.9 0.22 128 / 0.35), 0 -4px 0 oklch(0.9 0.22 128 / 0.35), 4px -4px 0 oklch(0.9 0.22 128 / 0.35);
}
.gh-pop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 10px; }
.gh-pop-date { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.gh-pop-count { font-size: 11px; color: var(--sub); white-space: nowrap; }
.gh-pop-note { padding: 12px 0; font-size: 13px; color: var(--sub); }
.gh-pop-rows > :last-child { border-bottom: none; }
/* Contact 창: 잔디 작은 창 부품을 쓰되, 연락처가 또렷이 읽히게 링크 카드와 같은 paper 바탕에 ink 글자로 둔다.
   줄은 누르면 복사되는 단추이고, 마우스를 올리거나 Tab으로 닿으면 lime으로 채운다 */
.ct-pop { z-index: 50; width: min(340px, calc(100vw - 24px)); background: var(--paper); color: var(--ink); border-color: var(--ink); }
.ct-pop .gh-pop-count, .ct-pop .gh-pop-note { color: oklch(0.42 0.006 270); }
.ct-pop .gh-pop-rows { border-top-color: var(--ink); border-bottom: 1px solid var(--ink); }
.ct-row {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 9px 0; width: 100%;
  border: none; border-bottom: 1px solid oklch(0.14 0.006 270 / 0.12); background: transparent; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
/* 채움은 양옆으로 6px 넓혀 글자가 칸 끝에 붙지 않게 하되, 글 시작 자리는 제목줄과 맞춘다 */
.ct-row:hover, .ct-row:focus-visible { background: var(--lime); box-shadow: -6px 0 0 var(--lime), 6px 0 0 var(--lime); outline: none; }
.ct-title { font-size: 13px; font-weight: 700; white-space: nowrap; }
.ct-mail { justify-self: end; font-size: 12px; white-space: nowrap; }
.ct-desc { grid-column: 1 / -1; font-size: 12px; line-height: 1.4; }

/* 치트시트 */
.t-cheat { flex: 1; display: flex; overflow: hidden; min-height: 276px; }
.keys {
  flex: none; width: 40px; background: oklch(0.13 0.006 270); border-right: 1px solid oklch(1 0 0 / 0.12);
  font-family: var(--sys-mono); display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding: 10px 0;
}
.key { display: flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1; }
.key-g { font-size: 15px; font-weight: 700; color: var(--tile-fg); }
.key-n { font-size: 9px; font-weight: 500; color: var(--sub); }
.cheat {
  flex: 1; min-width: 0; padding: 14px 16px 12px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Pretendard Variable', Pretendard, system-ui, sans-serif;
}
.cheat-group { display: flex; flex-direction: column; gap: 4px; }
.cheat-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.cheat-rows.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 10px; }
.cheat-row {
  display: flex; gap: 10px; min-width: 0; padding: 0; border: none; background: transparent; color: var(--tile-fg);
  font: inherit; font-size: 11px; line-height: 1.25; white-space: nowrap; text-align: left; cursor: pointer;
}
.cheat-row:hover { color: var(--lime); }
.cheat-row b { font-family: var(--sys-mono); font-weight: 700; flex: none; }
.cheat-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: color-mix(in oklch, currentColor 74%, var(--tile)); }

/* 별 순위: 치트시트와 같은 칸, 같은 글꼴. 오른쪽 위 단추로 둘을 바꾼다 */
.t-cheat[data-mode="stars"] .keys, .t-cheat[data-mode="stars"] .cheat, .t-cheat[data-mode="cheat"] .stars { display: none; }
.modes { position: absolute; z-index: 2; top: 12px; right: 14px; display: flex; border: 1px solid var(--btn-line); }
.mode-btn { border: none; background: transparent; color: var(--sub); font: inherit; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 3px 7px; cursor: pointer; }
.mode-btn:hover { color: var(--tile-fg); }
.mode-btn.on, .mode-btn.on:hover { background: var(--lime); color: var(--ink); }
/* 순위는 칸 높이를 늘리지 않게 칸 전체를 덮고, 넘치는 줄은 안에서 스크롤한다. 왼쪽 키 줄은 치트시트에서만 보인다 */
.stars {
  position: absolute; inset: 0; padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Pretendard Variable', Pretendard, system-ui, sans-serif;
}
.st-head { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 118px; font-size: 11px; }
.st-sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sub); }
.st-sum b { color: var(--lime); font-weight: inherit; }
/* FILTER·MORE 단추는 옆의 STARS·CHEAT와 같은 글자 모양. MORE는 같은 조건의 GitHub 검색을 새 탭으로 연다 */
.st-chip.st-more { text-decoration: none; }
.st-chip.st-filter, .st-chip.st-more { padding: 3px 7px; font-family: Archivo, sans-serif; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.st-chip { flex: none; border: 1px solid var(--btn-line); background: transparent; color: var(--tile-fg); font: inherit; font-size: 11px; padding: 2px 7px; cursor: pointer; }
.st-chip:hover, .st-chip.on { border-color: var(--lime); color: var(--lime); }
.st-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: oklch(1 0 0 / 0.18) transparent; border-top: 1px solid var(--tile-line); }
.st-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid oklch(1 0 0 / 0.07); color: var(--tile-fg); font-size: 12px; white-space: nowrap; }
.st-row:hover, .st-row.on { color: var(--lime); }
.st-no { flex: none; width: 2ch; text-align: right; font-family: var(--sys-mono); font-size: 10px; color: var(--sub); }
.st-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.st-name span, .st-lang { color: color-mix(in oklch, currentColor 60%, var(--tile)); }
.st-lang { flex: none; font-size: 10px; }
.st-star { flex: none; min-width: 7ch; text-align: right; font-family: var(--sys-mono); font-size: 11px; font-weight: 700; }
/* 별은 고정폭 글꼴에 없어 모양이 달라지므로 위 줄 요약의 별과 같은 글꼴로 그린다 */
.st-star i { font-style: normal; font-family: -apple-system, 'Segoe UI', sans-serif; font-weight: 400; }
.st-note { padding: 10px 0; font-size: 12px; color: var(--sub); }
/* 미니 칸: 잔디 작은 창(.gh-pop)을 그대로 쓰고, 화면에 고정해 칸 밖으로 띄운다. 안의 값은 누를 수 없어 테두리 없는 채운 상자로 둔다 */
.st-pop { position: fixed; z-index: 50; width: min(320px, calc(100vw - 16px)); padding-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.st-pop > * { flex: none; }
/* 칸과 미니 칸 사이(칸 안쪽 여백 14px + 틈 8px)를 덮는 보이지 않는 다리. 마우스가 여기를 지나면 미니 칸 위에 있는 것으로 친다 */
.st-pop::before { content: ''; position: absolute; top: 0; bottom: 0; right: 100%; width: 24px; }
.st-pop.below::before { top: auto; left: 0; right: 0; bottom: 100%; width: auto; height: 14px; }
/* 제목 줄과 내용은 창 테두리와 같은 연두 선으로 나눈다 */
.st-pop .gh-pop-head { padding-bottom: 10px; border-bottom: 1px solid oklch(0.9 0.22 128 / 0.35); }
.st-pop .gh-pop-date { min-width: 0; overflow-wrap: anywhere; }
.st-pop .gh-pop-date span { color: var(--sub); font-weight: 500; }
/* 설명과 주제가 길면 미니 칸 크기는 그대로 두고 그 안에서 스크롤한다 */
.st-pop > .st-body {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: oklch(1 0 0 / 0.18) transparent;
}
.st-desc { margin: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.st-topics { display: flex; flex-wrap: wrap; gap: 4px; }
.st-topics span { padding: 2px 6px; background: oklch(1 0 0 / 0.08); font-size: 10px; }
.st-meta { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 10px; padding-top: 8px; border-top: 1px solid var(--tile-line); font-size: 11px; }
.st-meta span { color: var(--sub); }
.st-meta b { font-weight: 600; }.st-panel { position: absolute; inset: 42px 0 0; padding: 4px 14px 12px; background: var(--tile); display: flex; flex-direction: column; gap: 10px; overflow-y: auto; scrollbar-width: none; }
.st-panel[hidden] { display: none; }
.st-group { display: flex; gap: 8px; align-items: baseline; }
.st-label { flex: none; width: 44px; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; white-space: nowrap; color: var(--sub); }
.st-chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* 색 띠 */
.t-wave { flex: none; height: 130px; display: flex; border: 1px solid var(--btn-line); }
.sw {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 0; border: none;
  font: inherit; text-align: left; cursor: pointer; overflow: hidden;
}
.sw-lime { background: var(--lime); color: var(--ink); }
.sw-ink { background: var(--ink); color: oklch(0.98 0.003 120); }
.sw-paper { background: var(--paper); color: var(--ink); }
.sw-orange { background: var(--orange); color: var(--ink); }
.sw-coral { background: var(--coral); color: var(--ink); }
.veil { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: oklch(0.22 0.005 270); opacity: 0.72; }
.sw-name { flex: 2; padding: 12px 10px; font-size: 14px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.sw-deco { position: relative; flex: 1; overflow: hidden; }
.ink-bars { position: absolute; left: 10px; right: 10px; bottom: 8px; top: 6px; display: flex; align-items: flex-end; gap: 2px; }
.ink-bars i { flex: 1; background: var(--lime); }
.paper-hatch {
  position: absolute; inset: 0; border-top: 1px solid oklch(0.45 0.1 135);
  background: repeating-linear-gradient(45deg, oklch(0.14 0.006 270 / 0.22) 0 1px, transparent 1px 5px);
}
.knob { position: absolute; top: -3px; width: 6px; height: 6px; background: var(--paper); border: 1px solid var(--ink); }
.barcode {
  position: absolute; left: 10px; right: 10px; top: 6px; bottom: 8px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px, var(--ink) 12px 13px, transparent 13px 17px);
}
.checker {
  position: absolute; inset: 0; opacity: 0.85;
  background: repeating-conic-gradient(oklch(0.98 0.003 120) 0 25%, transparent 0 50%) 0 0 / 10px 10px;
  -webkit-mask-image: linear-gradient(180deg, transparent, black 60%);
  mask-image: linear-gradient(180deg, transparent, black 60%);
}

/* 작은 뵴: 칸은 script.js가 채우고, 색은 자리마다 따로 준다 */
.mini {
  position: absolute; pointer-events: none; width: 45px; height: 40px; display: grid;
  grid-template-columns: repeat(9, 5px); grid-template-rows: repeat(8, 5px);
  --edge: oklch(0.14 0.006 270 / 0.55);
  filter: drop-shadow(1px 0 0 var(--edge)) drop-shadow(-1px 0 0 var(--edge)) drop-shadow(0 -1px 0 var(--edge)) drop-shadow(0 1px 0 var(--edge));
}
/* 칸이 확대·이동될 때 칸 사이 틈이 비쳐 격자가 보이지 않게, 큰 뵴처럼 칸마다 같은 색 0.6px를 두른다 */
.mini .leaf { background: var(--m-leaf); box-shadow: 0 0 0 0.6px var(--m-leaf); }
.mini .body { background: var(--m-body); box-shadow: 0 0 0 0.6px var(--m-body); }
.mini .blush { background: var(--m-blush); box-shadow: 0 0 0 0.6px var(--m-blush); }
.mini .nose { background: var(--ink); box-shadow: 0 0 0 0.6px var(--ink); }
.mini .mouth { background: var(--m-body); box-shadow: 0 0 0 0.6px var(--m-body); display: flex; justify-content: center; }
.mini .mouth::after { content: ''; width: 2px; height: 1.5px; margin-top: 1px; background: var(--ink); }
.mini .eye { background: var(--m-body); box-shadow: 0 0 0 0.6px var(--m-body); display: grid; place-items: center; }
.mini .eye::after { content: ''; width: 4px; height: 4px; background: var(--ink); }
.sw-lime .mini {
  z-index: 1; right: 0; bottom: 14px; transform-origin: 100% 100%; transform: translateX(105%) rotate(0deg);
  --m-leaf: oklch(0.62 0.17 140); --m-body: oklch(0.97 0.035 125); --m-blush: oklch(0.82 0.1 20);
}
.sw-ink .mini {
  z-index: 1; left: 50%; top: 0; margin-left: -22px; transform-origin: 50% 50%; transform: translateY(-105%) rotate(180deg);
  --m-leaf: var(--lime); --m-body: oklch(0.98 0.003 120); --m-blush: oklch(0.82 0.1 20);
}
.sw-orange .mini {
  z-index: 1; left: 0; bottom: 14px; transform-origin: 0 100%; transform: translateX(-105%) rotate(0deg);
  --m-leaf: oklch(0.98 0.003 120); --m-body: oklch(0.98 0.003 120); --m-blush: var(--coral);
}
.sw-coral .mini {
  z-index: 3; right: -4px; bottom: -4px; transform-origin: 100% 100%; transform: translate(100%,100%) rotate(40deg) scale(1);
  --m-leaf: oklch(0.62 0.09 55); --m-body: oklch(0.98 0.003 120); --m-blush: var(--coral);
  --edge: oklch(0.14 0.006 270 / 0.9);
}

/* 픽셀 풍경 */
.t-hero {
  flex: 1; overflow: hidden; min-height: clamp(520px, 62vw, 660px);
  background: oklch(0.1 0.01 140); border: 1px solid oklch(0.9 0.22 128 / 0.35);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 30px 22px 64px; box-shadow: 0 0 40px -10px oklch(0.9 0.22 128 / 0.35);
}
.sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, oklch(0.2 0.04 255) 0 16%, oklch(0.27 0.05 252) 16% 30%, oklch(0.36 0.06 245) 30% 42%, oklch(0.55 0.1 40) 42% 50%, oklch(0.7 0.13 55) 50% 56%, oklch(0.82 0.12 75) 56% 100%);
}
.sun, .balloon-top {
  position: absolute;
  clip-path: polygon(30% 0,70% 0,70% 10%,85% 10%,85% 20%,95% 20%,95% 30%,100% 30%,100% 70%,95% 70%,95% 80%,85% 80%,85% 90%,70% 90%,70% 100%,30% 100%,30% 90%,15% 90%,15% 80%,5% 80%,5% 70%,0 70%,0 30%,5% 30%,5% 20%,15% 20%,15% 10%,30% 10%);
}
.sun { left: 60%; top: 28%; width: 64px; height: 64px; background: oklch(0.86 0.15 70); }
.cloud { position: absolute; width: 72px; height: 22px; pointer-events: none; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: oklch(0.95 0.02 80 / 0.9); }
.cloud::before { left: 0; bottom: 0; width: 72px; height: 10px; }
.cloud::after { left: 16px; top: 0; width: 36px; height: 12px; }
.balloon { position: absolute; left: 26%; top: 9%; width: 60px; height: 96px; pointer-events: none; }
.balloon-top {
  left: 0; top: 0; width: 60px; height: 60px;
  background: linear-gradient(90deg, var(--coral) 0 20%, oklch(0.98 0.003 120) 20% 40%, var(--coral) 40% 60%, oklch(0.98 0.003 120) 60% 80%, var(--coral) 80% 100%);
}
.rope { position: absolute; top: 60px; width: 2px; height: 22px; background: var(--ink); }
.basket { position: absolute; left: 16px; top: 80px; width: 28px; height: 14px; background: oklch(0.45 0.08 55); box-shadow: inset 0 -4px 0 oklch(0.35 0.07 50); }
.hills { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; }
.hills > span { flex: 1; }
.hills.far { height: 52%; }
.hills.far > span { background: oklch(0.42 0.12 135); }
.hills.near { height: 40%; }
.hills.near > span { background: oklch(0.26 0.08 140); }
.hero-fade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, oklch(0.1 0.02 140 / 0.8) 100%); }
.mini.walker {
  left: 0; bottom: 4px; width: 36px; height: 32px; filter: none;
  grid-template-columns: repeat(9, 4px); grid-template-rows: repeat(8, 4px);
  --m-leaf: oklch(0.72 0.2 142); --m-body: var(--lime); --m-blush: oklch(0.8 0.12 10);
}
.mini.walker .mouth::after { content: none; }
.mini.walker .eye::after { width: 3px; height: 3px; }
.hero-body { position: relative; margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-body h1 {
  margin: 0; font-family: Silkscreen, monospace; font-size: clamp(26px, 3vw, 36px); font-weight: 400;
  line-height: 1.15; letter-spacing: 0; text-shadow: 3px 3px 0 var(--ink);
}
.hero-tag {
  display: inline-block; margin-top: 8px; padding: 2px 12px; background: var(--lime); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); text-shadow: none; transform: rotate(-2deg);
}
.hero-btn {
  margin-top: 34px; border: none; background: oklch(0.985 0.006 100); color: var(--ink);
  font-family: Silkscreen, monospace; font-size: 14px; font-weight: 400; padding: 12px 24px;
  box-shadow: 3px 3px 0 var(--ink); cursor: pointer; transition: background .15s, color .15s;
}
.hero-btn:hover { background: var(--orange); color: var(--ink); }

/* 방문자 수: 슬롯머신 모양. 숫자 칸 하나는 위아래 반쪽 색이 다른 넘김판이고, 칸 폭은 칸 수(--nd)와 칸 폭(cqw)에 맞춰 줄어든다.
   색은 --vc-* 값만 쓰고, 왼쪽 색 띠를 누르면 script.js가 data-theme을 바꿔 칸 색이 넘어간다. Ink가 기본 색이다 */
.t-visits {
  --vc-bg: var(--tile); --vc-fg: var(--tile-fg); --vc-sub: var(--sub); --vc-hi: var(--lime);
  --vc-tag-bg: var(--lime); --vc-tag-fg: var(--ink); --vc-knob: var(--coral);
  flex: none; height: 130px; overflow: hidden; padding: 12px 14px 14px; container-type: inline-size;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--vc-bg); color: var(--vc-fg); border: 1px solid var(--tile-line);
  transition: background-color .35s ease, color .35s ease;
}
.t-visits[data-theme="lime"] { --vc-bg: var(--lime); --vc-fg: var(--ink); --vc-sub: oklch(0.14 0.006 270 / 0.62); --vc-tag-bg: var(--ink); --vc-tag-fg: var(--lime); }
.t-visits[data-theme="paper"] { --vc-bg: var(--paper); --vc-fg: var(--ink); --vc-sub: oklch(0.14 0.006 270 / 0.55); --vc-hi: var(--paper); --vc-tag-bg: var(--ink); --vc-tag-fg: var(--paper); }
.t-visits[data-theme="orange"] { --vc-bg: var(--orange); --vc-fg: var(--ink); --vc-sub: oklch(0.14 0.006 270 / 0.62); --vc-hi: var(--orange); --vc-tag-bg: var(--ink); --vc-tag-fg: var(--orange); --vc-knob: var(--paper); }
.t-visits[data-theme="coral"] { --vc-bg: var(--coral); --vc-fg: var(--ink); --vc-sub: oklch(0.14 0.006 270 / 0.62); --vc-hi: var(--coral); --vc-tag-bg: var(--ink); --vc-tag-fg: var(--coral); --vc-knob: var(--paper); }
.t-visits .tag { background: var(--vc-tag-bg); color: var(--vc-tag-fg); transition: background-color .35s ease, color .35s ease; }
.vc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }/* 오늘·이번 주: 큰 숫자판과 같은 넘김판을 작게 줄인 칸. 오늘은 4칸, 이번 주는 5칸이고, 칸 수를 넘으면 K·M으로 줄인다(script.js vcShort) */
.vc-stats { display: flex; align-items: center; gap: 10px; }
.vc-mini { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--vc-sub); white-space: nowrap; transition: color .35s ease; }
.vc-mini > i { font-style: normal; }
.vc-mini b { display: flex; gap: 1px; }
/* 작은 칸에는 접힌 선을 긋지 않는다(숫자를 가로질러 읽기 어려워진다) */
.vc-mini b > span {
  position: relative; width: 12px; height: 18px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(180deg, oklch(0.25 0.008 270) 0 50%, oklch(0.21 0.008 270) 50% 100%);
}
.vc-mini em { font-style: normal; font-family: Silkscreen, monospace; font-size: 13px; line-height: 1; color: var(--vc-hi); transition: color .35s ease; }
.vc-mini b > span.lead em { color: oklch(1 0 0 / 0.3); }
/* 칸이 좁으면 위 줄이 들어가게 사이와 작은 숫자판을 줄인다. 290px는 줄이지 않은 위 줄(이름표·오늘·주간)이 들어가는 칸 안쪽 폭(289.92px)이다 */
@container (max-width: 290px) {
  .vc-head { gap: 6px; }
  .t-visits .tag { letter-spacing: 0.02em; }
  .vc-stats { gap: 6px; }
  .vc-mini { gap: 2px; }
  .vc-mini b > span { width: 8px; height: 16px; }
  .vc-mini em { font-size: 10px; }
}
.vc-body { display: flex; align-items: stretch; gap: 10px; }

/* 숫자 창: 위아래 가장자리에 전구 줄, 좌우에 당첨 줄 화살표. 돌 때(.spin)는 전구가 흐르고, 잭팟(.win)이면 깜빡인다 */
.vc-win {
  position: relative; flex: 1; min-width: 0; display: flex; justify-content: center; padding: 6px 12px;
  background: oklch(0.1 0.006 270); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.08), inset 0 3px 8px oklch(0 0 0 / 0.6);
}
.vc-win::before, .vc-win::after {
  content: ''; position: absolute; left: 12px; right: 12px; height: 2px;
  background: repeating-linear-gradient(90deg, oklch(1 0 0 / 0.2) 0 2px, transparent 2px 6px);
}
.vc-win::before { top: 2px; }
.vc-win::after { bottom: 2px; }
.vc-win.spin::before, .vc-win.spin::after { background-image: repeating-linear-gradient(90deg, var(--vc-hi) 0 2px, transparent 2px 6px); animation: vc-chase .24s steps(3) infinite; }
.vc-win.spin::after { animation-direction: reverse; }
.vc-win.win::before, .vc-win.win::after { background-image: repeating-linear-gradient(90deg, var(--vc-hi) 0 2px, transparent 2px 6px); animation: vc-blink .18s steps(1) infinite; }
@keyframes vc-chase { to { background-position-x: 6px; } }
@keyframes vc-blink { 50% { opacity: 0; } }
.vc-pay { position: absolute; top: calc(50% - 4px); width: 5px; height: 8px; background: var(--vc-hi); transition: background-color .35s ease; }
.vc-pay.l { left: 3px; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.vc-pay.r { right: 3px; clip-path: polygon(100% 0, 0 50%, 100% 100%); }

.vc-digits {
  position: relative; display: flex; gap: 4px;
  --cw: min(44px, calc((100cqw - 66px) / var(--nd, 6) - 4px));
}
.vc-d {
  position: relative; flex: none; width: var(--cw); height: 60px; overflow: hidden;
  background: linear-gradient(180deg, oklch(0.25 0.008 270) 0 50%, oklch(0.21 0.008 270) 50% 100%);
}
/* 가운데 접힌 선과 위아래로 갈수록 어두워지는 그늘(둥근 띠처럼 보이게) */
.vc-d::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, oklch(0 0 0 / 0.45), transparent 22% 78%, oklch(0 0 0 / 0.45)),
    linear-gradient(180deg, transparent calc(50% - 1px), var(--ink) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}
.vc-strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; color: var(--vc-hi); text-shadow: 0 0 10px color-mix(in oklch, var(--vc-hi) 40%, transparent); transition: color .35s ease; }
.vc-strip > span {
  flex: none; height: 60px; display: grid; place-items: center;
  font-family: Silkscreen, monospace; font-size: min(46px, calc(var(--cw) * 1.15)); line-height: 1;
}
/* 수 앞을 채운 0은 숫자와 갈리게 어둡게 둔다 */
.vc-d.lead .vc-strip { color: oklch(1 0 0 / 0.16); text-shadow: none; }
.vc-d.fail .vc-strip { visibility: hidden; }
.vc-d.fail::before { content: '-'; position: absolute; inset: 0; display: grid; place-items: center; font-family: Silkscreen, monospace; font-size: 24px; color: var(--sub); }
.vc-plus {
  position: absolute; right: 2px; top: -24px; pointer-events: none;
  font-family: Silkscreen, monospace; font-size: 13px; color: var(--orange); text-shadow: 1px 1px 0 var(--ink);
}

/* 손잡이: 도트 막대와 공. 누르면 script.js가 당겼다 놓는 움직임을 준다 */
.vc-lever { position: relative; flex: none; width: 22px; padding: 0; border: none; background: none; cursor: pointer; }
.vc-lever:focus-visible { outline: 2px solid var(--vc-hi); outline-offset: 3px; }
.vc-stick { position: absolute; left: 9px; bottom: 12px; width: 4px; height: calc(100% - 26px); background: oklch(0.72 0.006 270); transform-origin: 50% 100%; box-shadow: inset -1px 0 0 oklch(0 0 0 / 0.3); }
.vc-knob {
  position: absolute; left: 3px; top: 0; width: 16px; height: 16px; background: var(--vc-knob); transition: background-color .35s ease;
  clip-path: polygon(25% 0, 75% 0, 75% 12.5%, 87.5% 12.5%, 87.5% 25%, 100% 25%, 100% 75%, 87.5% 75%, 87.5% 87.5%, 75% 87.5%, 75% 100%, 25% 100%, 25% 87.5%, 12.5% 87.5%, 12.5% 75%, 0 75%, 0 25%, 12.5% 25%, 12.5% 12.5%, 25% 12.5%);
  box-shadow: inset -3px -3px 0 oklch(0 0 0 / 0.25), inset 3px 3px 0 oklch(1 0 0 / 0.35);
}
.vc-lever:hover .vc-knob { filter: brightness(1.12); }
.vc-base { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: oklch(0.1 0.006 270); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.1); }
.vc-base::after { content: ''; position: absolute; left: 9px; top: 3px; width: 4px; height: 6px; background: oklch(0 0 0 / 0.8); }

/* 서울 시계 */
.t-clock { background: var(--orange); color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; }
.clock-left { display: flex; flex-direction: column; gap: 4px; }
.clock-city { font-size: 15px; font-weight: 800; letter-spacing: 0.06em; }
.clock-date { font-size: 15px; font-weight: 600; }
.clock-time { display: flex; align-items: baseline; gap: 3px; font-variant-numeric: tabular-nums; }
.clock-hm { font-size: 36px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.clock-s { font-size: 17px; font-weight: 800; }
/* 달력 창: 잔디 작은 창(.gh-pop) 부품을 쓰되 바탕은 ink다. 머리 줄 Calendar 단추 아래에 떠 시계 칸을 덮으므로 맨 위 한 줄에 시각을 같이 두고, 창 테두리와 같은 연두 선으로 달력과 나눈다.
   날짜는 누를 수 없어 테두리 없이 두고, 오늘만 lime으로 채우며, 일요일은 coral 글자다. 달마다 줄 수가 달라도 창 크기가 그대로이게 늘 여섯 줄을 그리고, 앞뒤 달 날짜는 흐리게 둔다.
   세 열 화면에서는 script.js가 창 높이를 시계 칸 위부터 오늘의 브리프 칸 아래까지로 정하고(링크 모음 칸은 가리지 않는다), 날짜 줄이 남은 높이를 나눠 갖는다 */
.cal-pop { z-index: 50; background: var(--ink); padding: 10px 14px 8px; display: flex; flex-direction: column; }
/* 맨 위 한 줄: 왼쪽에 보고 있는 연도·월과 지금 시각, 오른쪽 끝에 ‹ › 단추 */
.cal-pop .gh-pop-head { align-items: center; padding-bottom: 8px; border-bottom: 1px solid oklch(0.9 0.22 128 / 0.35); }
.cal-when { display: flex; align-items: baseline; gap: 10px; }
.cal-time { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav .menu-btn { width: 28px; height: 22px; padding: 0; }
.cal-nav .menu-btn:focus-visible { outline: none; border-color: var(--lime); }
.cal-grid { flex: 1; width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; font-variant-numeric: tabular-nums; }
.cal-grid th { padding: 6px 0 4px; border-bottom: 1px solid var(--tile-line); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--sub); }
.cal-grid td { height: 24px; padding: 0; font-size: 13px; font-weight: 600; }
.cal-grid td span { display: inline-grid; place-items: center; width: 28px; height: 22px; }
/* 일요일은 첫 열이다(풍경 칸의 .sun과 이름이 겹치지 않게 이름을 붙이지 않는다) */
.cal-grid :is(th, td):first-child { color: var(--coral); }
.cal-grid td.out { color: oklch(1 0 0 / 0.25); }
.cal-grid .today span { background: var(--lime); color: var(--ink); font-weight: 800; }

/* AI 소식 */
.t-brief {
  overflow: hidden; background: oklch(0.99 0.002 120); color: var(--ink); padding: 16px 18px 8px;
  display: flex; flex-direction: column; box-shadow: 0 14px 28px -14px oklch(0 0 0 / 0.7);
}
.blobs { position: absolute; inset: -20%; pointer-events: none; opacity: 0.4; filter: hue-rotate(120deg); }
.blob { position: absolute; aspect-ratio: 1; border-radius: 50%; filter: blur(28px); }
.blob.a { left: -5%; top: -30%; width: 45%; background: oklch(0.8 0.13 350); }
.blob.b { right: 0; top: 0; width: 40%; background: oklch(0.8 0.12 230); }
.blob.d { left: 35%; bottom: -40%; width: 40%; background: oklch(0.86 0.1 70); }
.sheen { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; pointer-events: none; background: linear-gradient(100deg, transparent, oklch(1 0 0 / 0.45), transparent); }
.brief-head { position: relative; display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; }
.brief-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.03em; }
.brief-ai { width: 28px; height: 28px; display: grid; place-items: center; background: var(--ink); color: oklch(0.98 0.003 120); font-size: 11px; font-weight: 800; }
.brief-date { font-size: 11px; font-weight: 600; color: oklch(0.45 0.005 270); white-space: nowrap; }
.brief-row {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 0; border: none;
  border-top: 1px solid oklch(0.14 0.006 270 / 0.12); background: none; color: inherit; font: inherit;
  text-align: left; cursor: pointer; min-width: 0; width: 100%;
}
/* 이름(10px 대문자)과 오른쪽 숫자(.brief-count)의 top은 대문자 높이 가운데를 제목(14px) 대문자 높이 가운데에 맞춘 값으로, 브라우저에서 잰 것이다 */
.brief-cat { flex-shrink: 0; width: 62px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: oklch(0.35 0.005 270); position: relative; top: 0.625px; }
.brief-text { font-size: 14px; font-weight: 600; }
/* UPDATES 줄의 회사 로고: 제목과 7px 띄운다(AI News 회사 로고와 같은 간격). top은 그려진 가운데를 제목(Archivo 14px, 대문자 높이 9.625px) 대문자 높이 가운데에 맞춘 값으로, 브라우저에서 잰 것이다 */
.brief-logo { flex: none; width: 16px; height: 16px; margin-right: -3px; position: relative; top: 0.6875px; }
/* 요약을 못 읽은 칸에서 칸 크기를 지키는 빈 줄(누를 수 없음) */
div.brief-row { cursor: default; }
.brief-count { flex-shrink: 0; min-width: 24px; text-align: right; font-family: var(--mono); font-size: 10px; color: oklch(0.45 0.005 270); position: relative; top: 0.875px; }

/* 링크 모음 */
.t-hub { background: var(--tile); border: 1px solid var(--tile-line); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.hub-top { display: flex; gap: 8px; align-items: stretch; }
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px;
  background: oklch(0.12 0.006 270); border: 1px solid var(--btn-line);
}
.search-icon { font-size: 15px; color: var(--sub); }
.search-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: inherit; font: inherit; font-size: 14px; }
.kbd { padding: 1px 6px; border: 1px solid oklch(1 0 0 / 0.2); font-family: var(--mono); font-size: 10px; color: var(--sub); }
/* 메뉴 단추: 누르면 모든 링크를 띄우는 메뉴 창이 열린다 */
.menu-btn { width: 38px; border: 1px solid var(--btn-line); background: transparent; color: var(--tile-fg); font-size: 15px; cursor: pointer; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
/* 쪽 넘김 화살표(index.html의 chev): 글꼴마다 자리가 달라지는 ‹ › 글자 대신 그린 모양을 단추 정가운데에 둔다. ›는 좌우로 뒤집는다 */
.chev { display: block; margin: auto; }
.chev.next { transform: scaleX(-1); }

/* 격자는 4열·4줄이고, 칸 자리는 script.js가 카드마다 정한다. MY에서 카드가 적어도 4줄 높이를 지킨다 */
.hub-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, 86px); gap: 6px; }
.hc {
  position: relative; grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .3s var(--ease), box-shadow .3s, opacity .25s; cursor: pointer;
}
.hc:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -16px oklch(0 0 0 / 0.8); }
.hc-top { position: relative; display: flex; justify-content: space-between; align-items: center; }
.hc-kind, .dk-soon { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; white-space: nowrap; }
.hc-bottom { position: relative; display: flex; flex-direction: column; gap: 6px; }
.hc-desc { font-size: 13px; font-weight: 600; }
/* coral로 채운 곳의 글자는 ink로 쓴다(흰 글자는 대비 3.66:1로 모자라 2026-10-14 사용자 결정, ink는 5.2:1). 딱지·단추·알림·색 띠·방문자 칸 coral 색·방문자 카드가 같다 */
.hc-new { padding: 1px 6px; background: var(--coral); color: var(--ink); font-size: 10px; font-weight: 800; white-space: nowrap; }
.hc-bottom-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; min-width: 0; }
.hc-name { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; line-height: 24px; white-space: nowrap; }
/* 내 사이트 전용 큰 카드(script.js 목록의 big): 큰 이름이 위, 딱지(hc-new)는 오른쪽 위, 아래 줄 오른쪽 끝은 준비 중일 때 SOON이다.
   이름은 2×2 44px(낱말마다 줄을 바꿈), 2×1 30px 한 줄이 기본이고, 칸에 안 들면 script.js fitCardNames()가 줄인다. 그림(뵴·GitHub 마크)은 2×2에서 이름 위(마크 24px, 도트 3px 뵴 몸통 높이와 같음), 2×1에서 이름 왼쪽(16px)이다 */
.dk { overflow: hidden; isolation: isolate; min-width: 0; padding: 14px; container-type: inline-size; }
/* 가장 긴 아래 줄 「BYOM · NOVEL」과 SOON(135px)이 한 줄에 들지 않을 만큼 칸 안쪽 폭이 좁아지면(창 약 1190px 아래) 앞말(「BYOM · 」·「DEV · 」 등)을 숨겨 1×1처럼 종류만 쓴다. 바깥 링크 큰 카드(.hc-git)도 같은 기준이다 */
@container (width < 136px) { .hc-by { display: none; } }
.dk.hx-m { padding: 12px 14px; }
.dk-top { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dk-name { display: block; font-weight: 900; letter-spacing: -0.055em; line-height: 0.85; word-break: keep-all; overflow-wrap: normal; }
.hx-l .dk-name { font-size: 44px; }
.hx-m .dk-name { flex: 1; min-width: 0; font-size: 30px; white-space: nowrap; }
.hx-m.tagged .dk-name { margin-right: 52px; }
.dk .hc-new { position: absolute; top: 14px; right: 14px; }
.dk.hx-m .hc-new { top: 12px; }
.dk-marks { display: flex; gap: 5px; align-self: flex-start; }
.dk-mark { width: 24px; height: 24px; fill: currentColor; }
.hx-m .dk-top { flex-direction: row; align-items: center; }
.hx-m .dk-marks { flex: none; align-self: center; }
.hx-m .dk-mark { width: 16px; height: 16px; }
.dk .hc-desc { line-height: 1.3; }
.dk-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; }
.dk-row .hc-kind, .dk-soon { line-height: 1; }
/* 작은 칸 오른쪽 아래 ☆·★: 10×10 칸에 그린 모양이다. 담은 별(on)은 채우고, 어두운 칸에서는 lime, 밝은 칸에서는 글과 같은 색이다 */
.hc-star-ico { display: block; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; }
.hc-star-ico.on { fill: currentColor; color: var(--lime); }
.hx-light .hc-star-ico.on { color: inherit; }
.hc-git { background: oklch(0.22 0.006 270); border: 1px solid var(--btn-line); color: var(--tile-fg); padding: 12px 14px; container-type: inline-size; }
.hc-git .hc-kind { color: var(--sub); }
.hc-git svg { fill: currentColor; }
/* 작은 칸: 그림은 위, 이름은 칸 가운데, 종류 줄은 아래에 둔다. 누를 수 있으니 테두리를 두르고, 올리면 lime으로 바뀐다 */
.hc-mini {
  position: relative; min-width: 0; border: 1px solid var(--btn-line); padding: 9px 8px;
  display: grid; grid-template: "logo" auto "name" 1fr "row" auto / minmax(0, 1fr);
  color: var(--tile-fg); text-decoration: none; transition: border-color .2s, color .2s, opacity .25s;
}
.hc-mini:hover, .hc-mini:focus-visible { border-color: var(--lime); color: var(--lime); outline: none; }
.hc-mini-logos { grid-area: logo; display: flex; gap: 4px; height: 16px; }
.hc-mini-logo { width: 16px; height: 16px; fill: currentColor; }
.hc-mini-logo.mono { filter: invert(1); }
/* 이름은 한 줄이면 14px이다(「Anthropic」 66px이 86px 칸 안쪽 68px에 든다).
   14px로 한 줄에 안 들면 script.js fitMiniNames()가 long을 붙여 12px 두 줄로 줄인다(「ByomByom」이 한 줄에 드는 크기). 낱말 중간은 끊지 않는다 */
.hc-mini-name { grid-area: name; align-self: center; font-size: 14px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; overflow-wrap: break-word; }
.hc-mini-name.long { font-size: 12px; }
.hc-mini-name.tight { font-size: 11px; }
/* 아래 줄: 이름표가 두 줄로 접혀도(준비 중 칸에 별이 붙은 때) 별이 마지막 줄 옆 같은 높이에 오게 아래에 붙이고, 한 줄 높이 13px에서 가운데가 되게 1.5px 띄운다 */
.hc-mini-row { grid-area: row; display: flex; justify-content: space-between; align-items: flex-end; }
.hc-mini-row .hc-star { margin-bottom: 1.5px; }
.hc-mini-kind { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; color: var(--sub); }
.faded { opacity: 0.2; }
/* 내 사이트 칸의 바탕(hx-<id>): 전용 큰 카드(.dk)와 카드 창이 쓰고, Novel·CharChat·ByomByom GitHub는 1×1도 같다
   AI News·사주 큰 카드는 채운 밝은 칸이고, 사주 큰 카드 오른쪽 아래에는 빗금을 깐다 */
.hx-ainews, .hx-saju { color: var(--ink); }
.hx-ainews { background: radial-gradient(70% 140% at 0% 0%, oklch(0.84 0.1 200 / 0.7), transparent), radial-gradient(70% 140% at 100% 100%, oklch(0.88 0.1 70 / 0.7), transparent), var(--paper); }
.hx-saju { background: var(--lime); }
.dk.hx-ainews .hc-kind, .dk.hx-saju .hc-kind { color: oklch(0.32 0.006 270); }
/* AI News·Saju 1×1은 찾아보기에서 밝은 칸이 튀지 않게 다른 내 사이트 1×1처럼 어두운 칸에 기본 뵴과 흰 이름을 두고, 바탕에 그림을 깐다
   AI News는 로고의 하늘색·살구색을 짙게 깐 중간 밝기 칸에 전파 호와 망점을 오른쪽 아래로 갈수록 짙게, Saju는 사주 그림을 별자리 바퀴가 오른쪽에 오게 키우고 붉은 점은 칸 아래로 내보낸다 */
.hc-mini.hx-ainews, .hc-mini.hx-saju { color: var(--tile-fg); }
.hc-mini.hx-ainews { isolation: isolate; overflow: hidden; background: linear-gradient(135deg, oklch(0.6 0.1 212), oklch(0.68 0.11 62)); }
.hc-mini.hx-ainews .hc-mini-kind { color: oklch(1 0 0 / 0.78); }
.hc-mini.hx-ainews::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-radial-gradient(circle at 100% 100%, oklch(1 0 0 / 0.3) 0 1px, transparent 1.4px 9px), radial-gradient(oklch(1 0 0 / 0.35) 1.1px, transparent 1.6px) 0 0 / 6px 6px;
  -webkit-mask-image: linear-gradient(135deg, transparent 38%, #000 80%); mask-image: linear-gradient(135deg, transparent 38%, #000 80%);
}
.hc-mini.hx-saju { background: url("assets/saju-bg.webp") 87.5% 25% / auto 160%, oklch(0.22 0.03 260); }
.dk.hx-saju::before { content: ''; position: absolute; right: -20px; bottom: -20px; z-index: -1; width: 120px; height: 120px; background: repeating-linear-gradient(45deg, oklch(0.14 0.006 270 / 0.14) 0 1px, transparent 1px 6px); }
/* Novel·CharChat·ByomByom GitHub: 어두운 칸에 이름만 그 사이트 색(coral·orange·lime)으로 쓰고, 사이트 무늬(체크·바코드·막대)를 깔되
   왼쪽 위에서 어두운 바탕으로 덮어(::after) 오른쪽 아래 모서리에만 짙게 보인다. 막대 모양(mask)은 방문자 카드의 막대 무늬(.hx-pat-bars)와 같이 쓴다 */
.hx-novel, .hx-charchat, .hx-mygithub { isolation: isolate; overflow: hidden; background: oklch(0.22 0.006 270); }
.dk.hx-novel, .dk.hx-charchat, .dk.hx-mygithub { border: 1px solid var(--btn-line); color: var(--tile-fg); }
.dk.hx-novel .hc-kind, .dk.hx-charchat .hc-kind, .dk.hx-mygithub .hc-kind, .dk-soon { color: var(--sub); }
.hx-novel :is(.dk-name, .hc-mini-name) { color: var(--coral); }
.hx-charchat :is(.dk-name, .hc-mini-name) { color: var(--orange); }
.hx-mygithub :is(.dk-name, .dk-marks, .hc-mini-name) { color: var(--lime); }
.hx-novel::before, .hx-charchat::before, .hx-mygithub::before, .hx-novel::after, .hx-charchat::after, .hx-mygithub::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hx-novel::after, .hx-charchat::after, .hx-mygithub::after { background: linear-gradient(135deg, oklch(0.22 0.006 270) 45%, transparent 85%); }
.hx-novel::before { background: repeating-conic-gradient(oklch(0.63 0.2 25 / 0.4) 0 25%, transparent 0 50%) 0 0 / 10px 10px; }
.hx-charchat::before { --c: oklch(0.72 0.18 45 / 0.32); background: repeating-linear-gradient(90deg, var(--c) 0 2px, transparent 2px 4px, var(--c) 4px 5px, transparent 5px 8px, var(--c) 8px 11px, transparent 11px 12px, var(--c) 12px 13px, transparent 13px 17px); }
.hx-mygithub::before { height: 55%; background: oklch(0.9 0.22 128 / 0.36); }
/* 다른 칸을 2×2·2×1로 키운 카드: GitHub 카드 모양. 이름은 22px 한 줄이 기본이고, 넘치면 script.js fitCardNames()가
   2×1은 mid(18px 한 줄)·two(15px 두 줄), 2×2는 two(22px 두 줄)·tight(18px 두 줄)로 줄인다. 낱말 중간은 끊지 않는다. 2×1은 설명 없이 이름과 종류 줄만 둔다 */
.hx-gen .hc-top { gap: 8px; align-items: flex-start; }
.hx-gen .hc-name { min-width: 0; overflow: hidden; }
.hx-gen .hc-name.mid { font-size: 18px; line-height: 22px; }
.hx-gen .hc-name.two { white-space: normal; word-break: keep-all; overflow-wrap: normal; }
.hx-m .hc-name.two { font-size: 15px; line-height: 17px; }
.hx-l .hc-name.tight { font-size: 18px; line-height: 21px; }
.hx-big-logo { flex: none; width: 22px; height: 22px; fill: currentColor; }
/* 로고는 작은 칸처럼 늘 왼쪽에 둔다. 2×1은 이름 왼쪽(22px), 2×2는 이름 위(32px, 다른 크기보다 크게) */
.hx-gen .hx-big-logo { order: -1; }
.hx-m .hc-top { justify-content: flex-start; align-items: center; }
.hx-l .hc-top { flex-direction: column; }
.hx-l .hx-big-logo { width: 32px; height: 32px; }
.hx-l .hc-name { align-self: stretch; }
.hx-big-logo.mono { filter: invert(1); }
/* 내 칸의 뵴은 도트가 딱 떨어지게 줄이거나 키우지 않고 제 크기로 그린다. 그림 둘레는 테두리·빛 번짐 자리라 그만큼 바깥 여백을 빼서,
   몸통이 그림 자리의 왼쪽 위에 맞고 옆 그림(GitHub 마크)은 몸통 끝에서 띄운다
   도트 2px(1×1·2×1): 그림 26×24px, 둘레 4px, 몸통 18×16px. 도트 3px(2×2): 그림 37×34px, 둘레 5px, 몸통 27×24px */
.hc-mini-logo[src$="byom-basic-2px.svg"], .dk-mark[src$="byom-basic-2px.svg"] { flex: none; width: 26px; height: 24px; margin: -4px; }
.dk-mark[src$="byom-basic-3px.svg"] { flex: none; width: 37px; height: 34px; margin: -5px; }
/* Claude Code 캐릭터(12×8칸)도 도트 한 칸을 정수 px로 맞춰 번지지 않게 그린다: 1×1 2px(24×16), 2×1 3px(36×24), 2×2 4px(48×32) */
.hc-mini-logo[src$="claude-code.svg"] { width: 24px; height: 16px; }
.hx-big-logo[src$="claude-code.svg"] { width: 36px; height: 24px; }
.hx-l .hx-big-logo[src$="claude-code.svg"] { width: 48px; height: 32px; }
.hc-git .hc-desc { color: var(--tile-fg); }
/* 링크인 GitHub 카드 모양은 올려도 글이 링크 색(a:hover)으로 바뀌지 않는다 */
.hc-git:hover { color: var(--tile-fg); }
/* 방문자가 만든 카드: 고른 색(--mb) 위에 무늬(::before)를 깔고, 배경 그림(--mi)은 어둡게 덮어 깐다. 밝은 바탕(hx-light)은 글이 ink이고 올리면 테두리도 ink다
   테두리와 아래 줄 이름표는 글 색을 옅게 섞어 어느 바탕에서나 보인다 */
.hx-made { position: relative; isolation: isolate; overflow: hidden; }
.hc-mini.hx-made, .hc-git.hx-made, .hx-pat-s.hx-made { background: var(--mb); border-color: color-mix(in oklch, currentColor 22%, transparent); }
.hc-mini.hx-made:hover, .hc-mini.hx-made:focus-visible { border-color: var(--lime); }
.hx-made.hx-light, .hx-made.hx-light:hover { color: var(--ink); }
.hc-mini.hx-made.hx-light:hover, .hc-mini.hx-made.hx-light:focus-visible { border-color: var(--ink); }
/* 배경 그림은 ::after에 깔고, 고른 위치(--mx·--my)를 칸에 맞춰 채운 뒤 그 점을 중심으로 키운다(--mz) */
.hx-made.hx-img, .hx-made.hx-img:hover { color: var(--paper); }
.hx-made.hx-img::after {
  content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(oklch(0.1 0.006 270 / 0.5), oklch(0.1 0.006 270 / 0.5)), var(--mi) var(--mx) var(--my) / cover no-repeat;
  transform: scale(var(--mz)); transform-origin: var(--mx) var(--my);
}
.hx-made .hc-mini-kind, .hx-made .hc-kind { color: color-mix(in oklch, currentColor 72%, transparent); }
.hx-made .hc-desc { color: inherit; }
/* 무늬: 사이트에 있는 무늬에서 가져왔다(빗금은 Paper 띠, 바코드는 Orange 띠, 체크는 Coral 띠, 막대는 Ink 띠, 사주는 사주 카드 모서리 빗금) */
.hx-made::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; --mp: color-mix(in oklch, currentColor 22%, transparent); }
.hx-pat-none::before { content: none; }
.hx-pat-hatch::before { background: repeating-linear-gradient(45deg, var(--mp) 0 1px, transparent 1px 5px); }
.hx-pat-barcode::before { --mp: color-mix(in oklch, currentColor 14%, transparent); background: repeating-linear-gradient(90deg, var(--mp) 0 2px, transparent 2px 4px, var(--mp) 4px 5px, transparent 5px 8px, var(--mp) 8px 11px, transparent 11px 12px, var(--mp) 12px 13px, transparent 13px 17px); }
.hx-pat-check::before {
  --mp: color-mix(in oklch, currentColor 30%, transparent); background: repeating-conic-gradient(var(--mp) 0 25%, transparent 0 50%) 0 0 / 10px 10px;
  -webkit-mask-image: linear-gradient(180deg, transparent 35%, #000); mask-image: linear-gradient(180deg, transparent 35%, #000);
}
.hx-pat-bars::before { --mp: color-mix(in oklch, currentColor 26%, transparent); height: 45%; background: var(--mp); }
.hx-pat-bars::before, .hx-mygithub::before {
  top: auto;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 20' preserveAspectRatio='none'%3E%3Cpath d='M0 12h3v8H0zM4 6h3v14H4zM8 9h3v11H8zM12 2h3v18h-3zM16 13h3v7h-3zM20 7h3v13h-3zM24 4h3v16h-3zM28 11h3v9h-3zM32 8h3v12h-3zM36 14h3v6h-3zM40 5h3v15h-3zM44 10h3v10h-3z'/%3E%3C/svg%3E") left bottom / 48px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 20' preserveAspectRatio='none'%3E%3Cpath d='M0 12h3v8H0zM4 6h3v14H4zM8 9h3v11H8zM12 2h3v18h-3zM16 13h3v7h-3zM20 7h3v13h-3zM24 4h3v16h-3zM28 11h3v9h-3zM32 8h3v12h-3zM36 14h3v6h-3zM40 5h3v15h-3zM44 10h3v10h-3z'/%3E%3C/svg%3E") left bottom / 48px 100% repeat-x;
}
.hx-pat-saju::before { inset: auto -20px -20px auto; width: 120px; height: 120px; background: repeating-linear-gradient(45deg, var(--mp) 0 1px, transparent 1px 6px); }
/* MY 홈 빈칸: 첫 칸은 메뉴 창을 EDIT 중으로 여는 「카드 더하기」 단추, 나머지는 채운 빈 상자 */
.hx-slot { background: oklch(1 0 0 / 0.03); }
.hx-addslot {
  display: flex; flex-direction: column; justify-content: space-between; padding: 9px 8px;
  border: 1px solid var(--btn-line); background: transparent; color: var(--tile-fg);
  font: inherit; font-size: 12px; font-weight: 800; letter-spacing: -0.02em; text-align: left; cursor: pointer; transition: border-color .15s, color .15s;
}
.hx-addslot:hover, .hx-addslot:focus-visible { border-color: var(--lime); color: var(--lime); outline: none; }

/* 단축키 팁: 격자 끝 주황 칸(4열 4행)에 메뉴 창을 여는 키를 누를 순서대로 번호만 붙여 세 줄로 적는다. 누르면 뵴이 말을 건다(채운 칸이라 테두리 없이, 올리거나 닿으면 안쪽 윤곽만 그린다)
   메뉴 창 메인 격자의 같은 자리(.hx-keycell)에는 같은 글을 흐린 주황으로 그린다.
   찾아보기에도 같은 단추가 「단축키 팁」 항목으로 나온다. MY에서는 EDIT로 빼고 다시 넣을 수 있다 */
.hub-keys, .hx-keycell, .hx-keylines { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.hub-keys, .hx-keycell { padding: 9px; font: 700 12px var(--mono); }
.hub-keys { border: none; background: var(--orange); color: var(--ink); text-align: left; cursor: pointer; }
.hub-grid > .hub-keys { grid-column: 4; grid-row: 4; }
.hub-keys:hover, .hub-keys:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); outline: none; }
.hub-keys i, .hx-keycell i { margin-right: 6px; font-style: normal; font-weight: 400; }
.hx-keycell { position: relative; background: oklch(0.72 0.18 45 / 0.14); color: var(--orange); }

/* 메뉴 창: 잔디 작은 창(.gh-pop) 부품을 써서 화면 가운데에 띄운다. 왼쪽은 메인(홈 격자와 같은 4열), 오른쪽은 찾아보기(분류 탭·검색·작은 칸 24개씩 쪽 넘김)
   칸은 양쪽 모두 홈 링크 모음과 같은 86px·간격 6px이라 카드가 홈과 똑같이 그려진다 */
.hub-pop {
  position: fixed; inset: 0; z-index: 50; margin: auto; width: fit-content; height: fit-content;
  max-width: calc(100vw - 24px); padding: 12px 16px 16px;
}
/* 얼음 마법사 뵴은 512px 프로필 PNG라, 그림 아래 투명 여백(높이의 10%쯤)만큼 창 테두리에 걸쳐 앉힌다 */
.hub-pop .hub-pop-buddy { height: 56px; bottom: calc(100% - 8px); }
.hub-pop .menu-btn:disabled { opacity: 0.3; cursor: default; background: transparent; border-color: oklch(1 0 0 / 0.12); color: var(--tile-fg); }
.hub-pop .menu-btn:focus-visible { outline: none; border-color: var(--lime); }
.hub-page-no { align-self: center; min-width: 30px; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--sub); font-variant-numeric: tabular-nums; }
.hx .gh-pop-head { align-items: center; }
.hx-close { width: 28px; height: 24px; padding: 0; display: grid; place-items: center; }
/* 몸통 높이 482px = 제목 줄 26 + 위 줄 26 + 안내·검색 줄 38 + 격자 네 줄 362 + 사이 10씩. 메인과 찾아보기의 줄 높이가 같아 두 격자가 같은 선에서 시작한다
   (찾아보기는 제목 줄과 위 줄 자리에 분류 탭 두 줄을 둔다) */
.hx-body { display: flex; height: 482px; }
.hx-title { flex: none; height: 26px; display: flex; align-items: center; }
.hx-main { flex: none; display: flex; flex-direction: column; gap: 10px; width: 363px; padding-right: 20px; border-right: 1px solid var(--tile-line); box-sizing: content-box; }
.hx-browse { flex: none; display: flex; flex-direction: column; gap: 10px; width: 546px; padding-left: 20px; box-sizing: content-box; }
/* 메인 위 줄: MY·EDIT, EDIT 중에는 오른쪽 끝에 NEW·IMPORT·EXPORT·RESET. 단추 사이는 분류 탭과 같다 */
.hx-bar { flex: none; display: flex; gap: 4px; }
.hx-sp { flex: 1; }
/* 안내는 찾아보기 검색 줄과 같은 높이의 점선 상자에 두 줄까지 들어간다. 점선이라 단추 테두리(실선)와 갈린다 */
.hx-hint {
  flex: none; height: 38px; margin: 0; padding: 0 10px; box-sizing: border-box; display: flex; align-items: center;
  border: 1px dotted var(--btn-line); font-size: 12px; line-height: 1.3; color: var(--tile-fg);
}
/* 메뉴 창 단추는 분류 탭과 같은 모양이고, 눌린 단추도 고른 탭처럼 어두운 바탕·lime 테두리·lime 글자다 */
.hx-tab, .hx-btn {
  flex: none; height: 26px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 9px;
  border: 1px solid var(--btn-line); background: transparent; color: var(--tile-fg);
  font: 800 10px Archivo, 'Pretendard Variable', Pretendard, sans-serif; letter-spacing: 0.08em; white-space: nowrap; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.hx-tab:hover, .hx-tab:focus-visible, .hx-btn:hover, .hx-btn:focus-visible { border-color: var(--lime); color: var(--lime); outline: none; }
.hx-tab[aria-selected="true"], .hx-btn[aria-pressed="true"] { background: oklch(0.12 0.006 270); border-color: var(--lime); color: var(--lime); }
/* 고른 탭·눌린 단추·고른 무늬·지금 크기·열린 크기 단추는 이미 lime 테두리라, 키보드로 닿으면 안쪽에 lime 선을 하나 더 그려 포커스를 가른다 */
.hx-tab[aria-selected="true"]:focus-visible, .hx-btn[aria-pressed="true"]:focus-visible, .hx-pat[aria-pressed="true"]:focus-visible,
.hx-size-opt[aria-pressed="true"]:focus-visible, .hx-ctl button[aria-expanded="true"]:focus-visible { outline: 1px solid var(--lime); outline-offset: -4px; }
.hx-btn.hx-sq { width: 26px; padding: 0; }
/* MY 단추는 켜지면 lime으로 채운다(STARS·CHEAT 단추와 같은 방식). MY가 켜진 것이 메뉴 창에서 가장 먼저 보이게 한다 */
.hx-btn.hx-my[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.hx-btn.hx-my[aria-pressed="true"]:hover, .hx-btn.hx-my[aria-pressed="true"]:focus-visible { background: var(--lime-hi); border-color: var(--lime-hi); color: var(--ink); }
/* 단추 안 그림(+·✓·×·연필): 10×10 칸 정가운데에 그린 선 */
.hx-ico { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }

/* 메인 격자: 홈 격자와 같은 4열·4줄·같은 칸으로 한 쪽씩 그린다 */
.hx-grid { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, 86px); gap: 6px; }
/* EDIT 중 카드: 빈칸이나 다른 카드로 끌어 옮기고, 아래에 크기·앞 칸·뒤 칸·빼기 줄이 붙는다. 끌어 놓을 자리는 칸 안쪽 lime 윤곽으로 보인다 */
.hx-movable { cursor: grab; }
.hx-movable img { pointer-events: none; }
.hx-over { outline: 2px solid var(--lime) !important; outline-offset: -2px; }
.hx-dragging { opacity: 0.4; }
.hx-grid .hc.hx-movable:hover { transform: none; box-shadow: none; }
.hx-ctl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; height: 26px; background: oklch(0.12 0.006 270); box-shadow: 0 -1px 0 oklch(1 0 0 / 0.14); cursor: default; }
.hx-ctl button {
  flex: 1 1 0; min-width: 0; display: grid; place-items: center; padding: 0; border: none; border-left: 1px solid oklch(1 0 0 / 0.12);
  background: transparent; color: var(--tile-fg); font: 800 10px Archivo, sans-serif; letter-spacing: 0.04em; cursor: pointer; transition: background-color .15s, color .15s;
}
.hx-ctl button[aria-expanded="true"] { background: oklch(0.2 0.006 270); color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.hx-ctl button:first-child { flex-grow: 1.5; border-left: none; }
.hx-ctl button:hover, .hx-ctl button:focus-visible { background: oklch(0.2 0.006 270); color: var(--lime); outline: none; box-shadow: inset 0 0 0 1px var(--lime); }
.hx-ctl button:disabled { opacity: 0.3; cursor: default; background: transparent; color: var(--tile-fg); box-shadow: none; }
/* 작은 창: 누른 단추 위에 붙어 뜨는 창(크기 고르기, RESET 확인) */
.hx-mini {
  position: absolute; z-index: 60; padding: 6px;
  background: var(--tile); border: 1px solid oklch(0.9 0.22 128 / 0.35); box-shadow: 0 14px 28px -14px oklch(0 0 0 / 0.7);
}
/* 크기 고르기 창: 네 크기를 모양 그림(2×2 틀 안에 칠한 칸)과 글로 늘어놓고, 지금 크기는 고른 탭처럼 보인다 */
.hx-size { display: flex; gap: 4px; }
.hx-size-opt {
  width: 44px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0;
  border: 1px solid var(--btn-line); background: transparent; color: var(--tile-fg);
  font: 800 10px Archivo, sans-serif; letter-spacing: 0.04em; cursor: pointer; transition: border-color .15s, color .15s;
}
.hx-size-opt:hover, .hx-size-opt:focus-visible { border-color: var(--lime); color: var(--lime); outline: none; }
.hx-size-opt[aria-pressed="true"] { background: oklch(0.12 0.006 270); border-color: var(--lime); color: var(--lime); }/* RESET 확인 창: 물음 한 줄과 다 지우기·그만두기. 처음 포커스는 그만두기에 두고, 지우는 단추만 coral이다 */
.hx-confirm { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.hx-confirm-text { margin: 0; font-size: 12px; line-height: 1.3; color: var(--tile-fg); white-space: pre; }
.hx-confirm-row { display: flex; justify-content: flex-end; gap: 4px; }
.hx-confirm-row.hx-stack { flex-direction: column; align-items: stretch; }
.hx-btn.hx-danger { border-color: var(--coral); color: var(--coral); }
.hx-btn.hx-danger:hover, .hx-btn.hx-danger:focus-visible { background: var(--coral); border-color: var(--coral); color: var(--ink); }
/* EDIT 중 메인 위 줄의 네 단추는 색으로 채워 가른다(NEW sky, IMPORT orange, EXPORT paper, 위험한 RESET coral). 올리거나 닿으면 주황 칸처럼 안쪽에 ink 윤곽만 그린다 */
.hx-btn.hx-fill, .hx-btn.hx-fill:hover, .hx-btn.hx-fill:focus-visible { background: var(--fc); border-color: var(--fc); color: var(--ft, var(--ink)); }
.hx-btn.hx-fill:hover, .hx-btn.hx-fill:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.hx-new { --fc: var(--sky); }
.hx-import { --fc: var(--orange); }
.hx-export { --fc: var(--paper); }
.hx-reset { --fc: var(--coral); }
.hx-shape { display: block; fill: currentColor; }
.hx-shape-bg { fill: none; stroke: currentColor; stroke-opacity: 0.35; }

/* 찾아보기 머리: 분류 탭은 메인의 제목 줄·위 줄과 같은 높이의 두 줄에 흘려 놓고, 두 줄이 넘치면 위아래로 굴린다.
   보조 칸이지만 막대를 숨기면 넘친 탭이 있는 줄 모르므로, 넘칠 때만 얇은 막대가 보인다
   오른쪽 끝 세로 칸은 첫 줄에 닫기, 둘째 줄에 EDIT 중에만 분류 편집 단추다 */
.hx-thead { flex: none; display: flex; gap: 8px; height: 62px; }
.hx-tabs { position: relative; flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px 4px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: oklch(1 0 0 / 0.18) transparent; }
.hx-tabs::-webkit-scrollbar { width: 4px; }
.hx-tabs::-webkit-scrollbar-thumb { background: oklch(1 0 0 / 0.18); }
.hx-tlist { display: contents; }
/* 내 분류가 없을 때 탭 뒤 남은 자리(보통 둘째 줄)는 메인 안내 줄과 같은 점선 상자에 「EMPTY」만 적어 채운다. 글은 탭과 같은 글꼴에 보조 정보 색이다 */
.hx-thint { flex: 1 1 0; min-width: 200px; height: 26px; padding: 0 9px; font: 800 10px Archivo, sans-serif; letter-spacing: 0.08em; color: var(--sub); }
.hx-tside { flex: none; display: grid; grid-template-rows: 26px 26px; row-gap: 10px; justify-items: end; align-items: center; }
.hx-srow { flex: none; display: flex; gap: 8px; align-items: stretch; }
.hx-srow .menu-btn { height: 38px; }
.hx-res { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hx-bgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 86px; gap: 6px; align-content: start; }
.hx-bc { position: relative; display: grid; }
/* 수정 중 찾아보기 칸은 누르지 않는 판이라 올려도 lime으로 바뀌지 않는다 */
.hx-still { pointer-events: none; }
/* 더하기 단추: EDIT 중에만 칸 오른쪽 위 모서리에 붙는다. 메인에 있으면 lime으로 채우고 ✓. 메인 주황 칸의 빼기(×)도 같은 단추다
   주황 칸의 첫 줄(「1 Ctrl+K」)이 칸 왼쪽에서 65px까지 오므로, 18px 단추를 모서리에서 2px 띄워 글자를 가리지 않게 한다 */
.hx-add {
  position: absolute; top: 2px; right: 2px; z-index: 1; width: 18px; height: 18px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--btn-line); background: var(--tile); color: var(--tile-fg); cursor: pointer;
  transition: border-color .15s, color .15s, background-color .15s;
}
.hx-add:hover, .hx-add:focus-visible { border-color: var(--lime); color: var(--lime); outline: none; }
.hx-add.in { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.hx-add.in:hover, .hx-add.in:focus-visible { background: var(--lime-hi); border-color: var(--lime-hi); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
/* 내가 만든 카드의 고치기 단추: 더하기 단추 왼쪽에 같은 모양으로 붙는다 */
.hx-add.hx-pen { right: 22px; }
/* 즐겨찾기 단추: EDIT 중 칸 오른쪽 아래 모서리를 덮는 보이지 않는 단추. 그림은 칸 안의 ☆·★이고, 올리거나 포커스하면 안쪽 lime 윤곽이 생긴다 */
.hx-favbtn { position: absolute; right: 0; bottom: 0; z-index: 1; width: 28px; height: 28px; padding: 0; border: none; background: transparent; cursor: pointer; }
.hx-favbtn:hover, .hx-favbtn:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--lime); }
.hx-empty { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 13px; }

/* 2차 창(카드 창·분류 창): 메뉴 창과 같은 작은 창 부품으로 메뉴 창 위에 뜨고, 뒤는 어둡게 덮는다. 몸통이 화면보다 길면 몸통 안에서 굴린다 */
.hx-back { position: fixed; inset: 0; z-index: 55; background: oklch(0.1 0.006 270 / 0.6); }
.hx-win { z-index: 56; width: 340px; }
.hx-win.hx-wide { width: 520px; }
.hx-wbody { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 110px); margin-right: -10px; padding-right: 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: oklch(1 0 0 / 0.18) transparent; }
.hx-wbody::-webkit-scrollbar { width: 4px; }
.hx-wbody::-webkit-scrollbar-thumb { background: oklch(1 0 0 / 0.18); }
.hx-form { display: flex; flex-direction: column; gap: 8px; }
/* 미리보기: 세 크기를 홈 칸과 같은 86px 격자에 그린다(자리는 script.js의 HX_PREV). 누를 수 없는 칸이라 테두리 없는 채운 상자에 두고, 격자는 상자 가운데에 놓는다 */
.hx-fprev { display: grid; grid-template-columns: repeat(4, 86px); grid-template-rows: repeat(2, 86px); justify-content: center; gap: 6px; margin-bottom: 4px; padding: 10px; background: oklch(0.12 0.006 270); pointer-events: none; }
/* 칸 한 줄: 왼쪽 이름표, 오른쪽 입력. 단추 묶음(아이콘·배경)은 이름표를 첫 줄에 맞춘다 */
.hx-f { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 10px; }
.hx-f.hx-ftop { align-items: start; }
.hx-f.hx-ftop > .hx-f-label { padding-top: 7px; }
.hx-f-label { font-size: 12px; font-weight: 700; color: var(--tile-fg); }
.hx-f-box { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hx-f-note { margin: 0; font-size: 11px; color: var(--sub); }
.hx-in {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--btn-line); background: oklch(0.12 0.006 270); color: var(--tile-fg);
  font: 500 13px 'Pretendard Variable', Pretendard, sans-serif; outline: none; color-scheme: dark; transition: border-color .15s;
}
.hx-in:hover, .hx-in:focus { border-color: var(--lime); }
.hx-in[aria-invalid="true"] { border-color: var(--coral); }
.hx-in::placeholder { color: var(--sub); }
.hx-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* 색 견본: 고른 색은 바깥에 lime 테두리를 한 겹 더 두른다. 직접 고르는 색(CUSTOM)은 브라우저 색 고르기 칸을 같은 견본 모양으로 쓰고, 다섯 색과 조금 띄운다 */
.hx-sw { flex: none; width: 26px; height: 26px; padding: 0; border: 1px solid var(--btn-line); background: var(--c); cursor: pointer; transition: border-color .15s; }
.hx-sw:hover, .hx-sw:focus-visible { border-color: var(--lime); outline: none; }
.hx-sw[aria-pressed="true"], .hx-own.on { box-shadow: 0 0 0 2px var(--tile), 0 0 0 3px var(--lime); }
.hx-own { -webkit-appearance: none; appearance: none; margin-left: 10px; background: none; }
.hx-own::-webkit-color-swatch-wrapper { padding: 0; }
.hx-own::-webkit-color-swatch { border: none; }
.hx-own::-moz-color-swatch { border: none; }
.hx-own-name { font: 800 10px Archivo, sans-serif; letter-spacing: 0.08em; color: var(--tile-fg); cursor: pointer; }
/* 무늬 견본: 지금 고른 색 위에 그 무늬를 그린 띠와 이름. 고른 무늬는 고른 탭처럼 보인다 */
.hx-pat {
  flex: none; width: 52px; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--btn-line); background: transparent; color: var(--tile-fg);
  font: 700 11px 'Pretendard Variable', Pretendard, sans-serif; cursor: pointer; transition: border-color .15s, color .15s;
}
.hx-pat:hover, .hx-pat:focus-visible { border-color: var(--lime); color: var(--lime); outline: none; }
.hx-pat[aria-pressed="true"] { background: oklch(0.12 0.006 270); border-color: var(--lime); color: var(--lime); }
.hx-pat-s { display: block; height: 22px; border: none; }
.hx-pat-n { padding: 4px 0; text-align: center; }
/* 배경 그림 위치 막대: 이름과 얇은 막대, lime 손잡이. 그림이 없으면 숨긴다 */
.hx-pos { display: flex; flex-direction: column; gap: 4px; }
.hx-pos[hidden] { display: none; }
.hx-pos-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; cursor: pointer; }
.hx-pos-name { font-size: 12px; font-weight: 700; color: var(--tile-fg); }
.hx-range { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; }
.hx-range::-webkit-slider-runnable-track { height: 2px; background: oklch(1 0 0 / 0.24); }
.hx-range::-moz-range-track { height: 2px; background: oklch(1 0 0 / 0.24); }
.hx-range::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 14px; margin-top: -6px; border: none; background: var(--lime); }
.hx-range::-moz-range-thumb { width: 10px; height: 14px; border: none; border-radius: 0; background: var(--lime); }
.hx-range:focus-visible { outline: 1px solid var(--lime); outline-offset: 2px; }
.hx-thumb { flex: none; width: 34px; height: 34px; background: oklch(0.12 0.006 270) center / contain no-repeat; }
.hx-thumb.hx-cover { background-size: cover; }
.hx-wfoot { display: flex; gap: 4px; padding-top: 6px; }
.hx-btn.hx-go { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.hx-btn.hx-go:hover, .hx-btn.hx-go:focus-visible { background: var(--lime-hi); border-color: var(--lime-hi); color: var(--ink); }
.hx-btn:disabled { opacity: 0.3; cursor: default; border-color: oklch(1 0 0 / 0.14); color: var(--tile-fg); }
/* 분류 창: 줄마다 이름 칸·안의 항목 수·지우기. 보관 칸의 지운 기본 분류는 이름을 흐리게 둔다 */
.hx-clist { display: flex; flex-direction: column; gap: 6px; }
.hx-crow { display: flex; align-items: center; gap: 6px; }
.hx-crow .hx-in { flex: 1; min-width: 0; height: 30px; }
/* 순서 손잡이: 이름 왼쪽의 테두리 없는 세 줄 막대. 끌어서 옮기고, 포커스한 뒤 위아래 방향키로도 옮긴다. 끄는 동안 줄은 흐려지고, 놓을 줄은 안쪽 lime 윤곽(.hx-over)이 된다 */
.hx-grip { flex: none; width: 18px; height: 30px; display: grid; place-items: center; color: var(--sub); cursor: grab; transition: color .15s; }
.hx-grip:hover, .hx-grip:focus-visible { color: var(--lime); outline: none; box-shadow: inset 0 0 0 1px var(--lime); }
/* 즐겨찾기 줄의 빈 손잡이·지우기 자리 */
.hx-grip-sp { flex: none; width: 18px; }
.hx-sq-sp { flex: none; width: 26px; }
.hx-ccount { flex: none; min-width: 34px; text-align: right; font-size: 11px; color: var(--sub); font-variant-numeric: tabular-nums; }
.hx-btn.hx-cadd { align-self: flex-start; }
.hx-csec { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--tile-line); }
.hx-cname { flex: 1; min-width: 0; font: 800 11px Archivo, sans-serif; letter-spacing: 0.08em; opacity: 0.45; }

/* 알림: 누른 자리 바로 위(자리가 없으면 아래)에 띄운다. 꼬리는 작은 창처럼 픽셀 계단이다. 글은 저절로 줄을 바꾸지 않고, 글 안의 \n에서만 바꾼다 */
.hx-toast {
  position: fixed; z-index: 95; padding: 7px 10px; background: var(--lime); color: var(--ink);
  font: 700 12px/1.3 'Pretendard Variable', Pretendard, sans-serif; white-space: pre; pointer-events: none;
  box-shadow: 3px 3px 0 var(--ink);
}
.hx-toast::after {
  content: ''; position: absolute; left: calc(var(--tx) - 2px); top: calc(100% + 4px); width: 4px; height: 4px; background: inherit;
  box-shadow: -4px -4px 0 var(--tc, var(--lime)), 0 -4px 0 var(--tc, var(--lime)), 4px -4px 0 var(--tc, var(--lime));
}
.hx-toast.below::after { top: -8px; box-shadow: -4px 4px 0 var(--tc, var(--lime)), 0 4px 0 var(--tc, var(--lime)), 4px 4px 0 var(--tc, var(--lime)); }
.hx-toast.warn { --tc: var(--coral); background: var(--coral); color: var(--ink); }

/* 파칭코 */
.t-pachi { flex: none; height: 130px; overflow: hidden; background: var(--paper); }
.t-pachi canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; cursor: pointer; touch-action: none; }
/* 키보드로 닿으면 판 안쪽에 ink 선을 그린다(칸이 넘치는 부분을 잘라 바깥 선은 보이지 않는다) */
.t-pachi canvas:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.hud {
  position: absolute; left: 8px; bottom: 0; height: 18px; display: flex; align-items: center; gap: 8px; pointer-events: none;
  color: var(--ink); font-family: var(--sys-mono); line-height: 1; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.hud-item { display: flex; align-items: center; gap: 5px; }
.hud-sep { width: 1px; height: 10px; background: oklch(0.14 0.006 270 / 0.45); }

/* 카드 창: 윗부분은 그 칸의 2×2 카드 바탕(hx-<id>)과 큰 이름(.dk-name)이다.
   AI News는 로고와 같은 색을 칸보다 진하게 칠하고 도트 B를 ink로, 사주는 사주 사이트 배경 그림(원본은 사주 저장소 `assets/bg.png`)을 깔고 글을 paper로 쓴다 */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 20px;
  background: oklch(0.1 0.006 270 / 0.8); font-family: Archivo, 'Pretendard Variable', Pretendard, sans-serif; color: var(--ink);
}
.overlay.on { display: grid; }
.card { position: relative; width: min(460px, 100%); background: var(--paper); display: flex; flex-direction: column; }
.card-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; isolation: isolate; }
.card-img .pxb { position: absolute; left: 18px; top: 16px; }
.card-img.hx-ainews { background: radial-gradient(80% 140% at 0% 0%, oklch(0.8 0.13 207), transparent), radial-gradient(80% 140% at 100% 100%, oklch(0.84 0.12 72), transparent), var(--paper); }
.card-img.hx-ainews .pxb > .on { background: var(--ink); }
.card-img.hx-saju { background: url("assets/saju-bg.webp") right center / cover, oklch(0.22 0.03 260); color: var(--paper); }
.card-close {
  position: absolute; right: 0; top: 0; width: 44px; height: 44px; border: none; background: var(--ink); color: var(--paper);
  font: inherit; font-size: 16px; cursor: pointer; transition: background .15s, color .15s;
}
.card-close:hover { background: var(--lime); color: var(--ink); }
.card-name { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.card-marks:empty { display: none; }
.card-title { font-size: clamp(40px, 9vw, 56px); }
.card-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 20px; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.card-kind { padding: 3px 7px; background: var(--ink); color: var(--paper); }
.card-addr { min-width: 0; font-family: var(--mono); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-desc { font-family: 'Pretendard Variable', Pretendard, sans-serif; font-size: 16px; line-height: 1.5; }
.card-open {
  margin-top: 4px; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px;
  background: var(--ink); color: var(--lime); font-size: 14px; font-weight: 700; transition: background .15s, color .15s;
}
.card-open:hover { background: var(--lime); color: var(--ink); }

/* 캐릭터 뵴: 모양과 움직임은 AI News와 함께 쓰는 assets/byom/byom.css에 있다. 홈은 메뉴 창(56)·카드 창(60) 위에서도 알림이 보이게 겹침 순서만 올린다 */
:root { --byom-z: 70; --byom-bubble-z: 71; }
