/* 스크롤 장면.
   html.scenes-on 일 때만 장면이 화면에 고정(sticky)되고 스크롤 양에 따라 움직인다.
   스크립트가 꺼졌거나 '애니메이션 줄이기' 설정이면 평범한 세로 페이지로 보인다. */

.scene { position: relative; }
.stage { position: relative; }
.scenes-on .scene { height: var(--len, 250vh); }
.scenes-on .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }

/* 터미널 글자 */
.term { font-family: var(--mono); font-size: var(--step-small); line-height: 1.7; } /* taste-skill-ignore: 사용자 요청 보안(터미널) 느낌 */
.term__prompt { color: var(--ink); }
.term__user { color: var(--ok); }
.caret { display: inline-block; width: 0.6em; height: 1.1em; margin-left: 4px; vertical-align: -0.2em; background: var(--accent-text); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── 첫 화면: 한눈에 보는 대시보드 ───────────── */
.dash { position: relative; min-height: 100svh; padding: 92px var(--gutter) 24px; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; }
.dash__head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; }
.dash__title { display: grid; gap: 6px; margin: 0; font-weight: 400; }
.dash__name { font-size: clamp(3rem, 5.6vw, 5.25rem); font-weight: 600; letter-spacing: -0.045em; line-height: 0.9; color: var(--ink); }
.dash__name .glyph { color: var(--muted); }
.dash__tag { font-family: var(--mono); font-size: var(--step-lead); font-weight: 400; letter-spacing: 0; color: var(--muted); } /* taste-skill-ignore: 사이트 주소는 터미널 글씨로 */
.dash__tag .glyph { color: var(--ink); }
.dash__status { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; font-size: var(--step-small); }
.dash__status div { display: grid; gap: 2px; }
.dash__status dt { font-family: var(--mono); color: var(--muted); } /* taste-skill-ignore: 사용자 요청 보안(터미널) 느낌 */
.dash__status dd { margin: 0; color: var(--ink); }
.dash__more { justify-self: center; font-family: var(--mono); font-size: var(--step-small); color: var(--muted); } /* taste-skill-ignore: 사용자 요청 보안(터미널) 느낌 */

.dash__grid { display: grid; grid-template-columns: clamp(300px, 20vw, 400px) repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; min-height: 0; }
.tile { padding: 18px 22px; display: grid; gap: 10px; align-content: start; min-height: 0; overflow: hidden; }
.tile__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.tile__head h2 { font-size: var(--step-lead); }
.tile__more { margin-left: auto; font-size: var(--step-small); color: var(--muted); text-decoration: none; white-space: nowrap; }
.tile__more:hover { color: var(--ink); }
/* Today(좁게) | News(크게, 두 줄 높이) | D-day · Shortcuts / Log · Programs (2 × 2) */
.tile--today { grid-column: 1; grid-row: 1 / span 2; grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
.tile--news { grid-column: 2; grid-row: 1 / span 2; grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
.tile--dday { grid-column: 3; grid-row: 1; }
.tile--alias { grid-column: 4; grid-row: 1; }
.tile--log { grid-column: 3; grid-row: 2; grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
.tile--app { grid-column: 4; grid-row: 2; grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }

/* 최근 글 (tail) */
.tail { display: grid; gap: 2px; margin-top: 8px; color: var(--muted); }
.tail li { display: grid; grid-template-columns: auto 1fr; gap: 12px; white-space: nowrap; overflow: hidden; }
.tail li:first-child { color: var(--ink); }
.tail .lvl { display: none; }
.tail a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; font-family: var(--font); }
.tail a:hover { color: var(--ink); text-decoration: underline 1px; text-underline-offset: 4px; }
.js .tail li { opacity: 0; animation: type-in 400ms steps(8) forwards; animation-delay: calc(500ms + var(--i, 0) * 110ms); }
@keyframes type-in { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

/* 바로가기 */
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.key {
  display: grid; gap: 0; padding: 7px 12px; border-radius: 14px; text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 14px -8px rgba(0, 0, 0, 0.7); /* taste-skill-ignore: 사용자 요청 버튼다운 바로가기 */
  transition: transform 220ms var(--ease-out), background-color 200ms, box-shadow 220ms;
}
.key b { font-size: var(--step-small); font-weight: 600; line-height: 1.3; }
.key span { font-size: 0.75rem; color: var(--muted); line-height: 1.3; }
.key:hover, .key:focus-visible { background: rgba(255, 255, 255, 0.11); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 20px -10px rgba(0, 0, 0, 0.8); } /* taste-skill-ignore: 사용자 요청 버튼다운 바로가기 */
.key:active { transform: translateY(0) scale(0.97); transition-duration: 100ms; }

/* 진행도 */

/* 캘린더 앱 */
.tile__app { display: flex; align-items: center; gap: 14px; }
.tile__app img { width: 40px; height: 40px; }
.tile__app p { display: grid; }
.tile__app span { font-family: var(--mono); font-size: var(--step-small); color: var(--muted); } /* taste-skill-ignore: 사용자 요청 보안(터미널) 느낌 */
.tile__app p { flex: 1; min-width: 0; }
.tile__app span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn--small { min-height: 36px; padding: 0 14px; font-size: var(--step-small); }
.programs { display: grid; gap: 14px; min-height: 0; overflow: auto; align-content: start; }

/* ── 장면 4: tree 출력 ───────────────────── */
.repo { display: grid; grid-template-columns: max-content minmax(0, clamp(280px, 18vw, 440px)) minmax(0, 1fr); gap: 32px clamp(40px, 4vw, 72px); align-items: center; padding: 104px var(--gutter) 40px; }
.repo .activity { grid-column: 2; }
.repo__side { grid-column: 1; display: grid; gap: 18px; align-content: center; }
.repo__count { display: flex; align-items: baseline; gap: 12px; font-size: var(--step-lead); font-weight: 600; }
.repo__count b { font-size: var(--step-display); line-height: 0.9; letter-spacing: -0.05em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.repo__foot { color: var(--muted); font-size: var(--step-small); font-family: var(--mono); } /* taste-skill-ignore: 사용자 요청 보안(터미널) 느낌 */
.repo__side .btn { justify-self: start; }
.term--window { grid-column: 3; min-width: 0; justify-self: end; width: min(100%, 50vw); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; height: min(66svh, 640px); overflow: hidden; }
.term__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; color: var(--muted); }
.term__bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-2); }
.term__bar span:first-child { background: var(--accent); }
.term__bar em { font-style: normal; margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term__screen { position: relative; overflow: hidden; padding: 0 22px 22px; }
.term__out { will-change: transform; }
.term__row { display: grid; grid-template-columns: auto 1fr auto; gap: 0 10px; white-space: pre; text-decoration: none; color: var(--ink); }
.term__row .br { color: var(--muted); }
.term__row .sz { color: var(--muted); }
.term__row--dir { color: var(--accent-text); font-weight: 500; }
.term__row--plan { color: var(--muted); }
a.term__row:hover .nm { text-decoration: underline 1px; text-underline-offset: 4px; }
.term__row .nm { overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); } /* taste-skill-ignore: 사용자 요청 보안(터미널) 느낌 */
.scenes-on .term__row { visibility: hidden; }
.scenes-on .term__row.is-on { visibility: visible; }

/* 장면이 꺼진 상태(스크립트 없음, 애니메이션 줄이기): 마지막 모습으로 보여 준다 */

@media (prefers-reduced-motion: reduce) {
  .caret, .js .tail li { animation: none; opacity: 1; }
}

/* 넓은 화면에서는 대시보드가 정확히 한 화면, 넘치는 목록은 타일 안에서 스크롤 */
@media (min-width: 1025px) {
  .dash { height: 100svh; min-height: 680px; }
}

/* ── 태블릿 ─────────────────────────────── */
@media (max-width: 1024px) {
  .dash { min-height: 0; }
  .dash__grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .tile--today { grid-column: 1 / -1; grid-row: auto; }
  .tile--dday, .tile--news, .tile--log, .tile--alias, .tile--app { grid-column: auto; grid-row: auto; height: auto; }
  .tile--news { height: 320px; }
  .repo { grid-template-columns: max-content minmax(0, 300px); justify-content: space-between; }
  .repo .activity { grid-column: 2; }

  .repo__foot { display: none; }
  .term--window { grid-column: 1 / -1; width: auto; justify-self: stretch; height: 52svh; }
  .repo { align-content: center; }
}

/* ── 휴대폰 ─────────────────────────────── */
@media (max-width: 720px) {
  .dash { padding-top: 84px; gap: 14px; }
  .dash__status { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .dash__grid { grid-template-columns: 1fr; gap: 12px; }
  .tile { padding: 18px 18px; }
  .tile--today { order: 1; } .tile--dday { order: 2; } .tile--alias { order: 3; } .tile--news { order: 4; } .tile--log { order: 5; } .tile--app { order: 6; }
  .tile__head { flex-wrap: wrap; }
  .tail li { grid-template-columns: 1fr; gap: 0; white-space: normal; }
  .tail li:nth-child(n+4) { display: none; }
  .repo { padding-top: 96px; gap: 20px; }
  .repo__count b { font-size: 4rem; }
  .term--window { height: 48svh; }
  .repo { grid-template-columns: minmax(0, 1fr); }
  .repo .activity { display: none; }
}

/* 타일 안 목록은 세로로만 스크롤 (Windows에서 가로 스크롤바가 보이지 않도록) */

/* ── 로고 엠블럼: 제목 왼쪽에 크게, 은은한 빛무리와 유리 링 ── */
.dash__brand { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); min-width: 0; }
.emblem {
  flex: 0 0 auto; width: clamp(96px, 9.5vw, 148px); height: auto; aspect-ratio: 1; border-radius: 50%;
  box-shadow: 0 0 70px 6px rgba(60, 92, 170, 0.5); /* taste-skill-ignore: 로고 빛무리 */
  transition: transform 300ms var(--ease-out);
}
.emblem:hover { transform: scale(1.04); }
.top__mark { display: inline-flex; align-items: center; gap: 10px; }
.top__mark img { width: 28px; height: 28px; border-radius: 50%; }

/* 프로그램 한 줄 설명 */
.tile__app { flex-wrap: wrap; row-gap: 8px; }
.tile__desc { order: 1; flex: 1 0 100%; font-style: normal; font-size: var(--step-small); color: var(--muted); line-height: 1.4; }
.tile__app .btn { order: 2; }

@media (max-width: 720px) {
  .emblem { width: 84px; }
}

/* 타일 안 목록은 세로로만, 스크롤바는 가늘고 옅게 */
.programs { overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }

/* Today: 코워크 캘린더 위젯을 그대로 띄운다 */
.today__date { color: var(--muted); font-size: var(--step-small); }
.widget-frame { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; border-radius: 18px; background: transparent; color-scheme: dark; }

/* ── Notes 옆 커밋 잔디 ─────── */
.activity { margin: 0; display: grid; gap: 12px; align-content: center; }
.activity__grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); grid-auto-columns: minmax(0, 1fr); gap: 3px; }
.activity__grid i { aspect-ratio: 1; border-radius: 3px; background: rgba(255, 255, 255, 0.06); }
.activity__grid .lv1 { background: rgba(140, 170, 235, 0.38); }
.activity__grid .lv2 { background: rgba(160, 190, 245, 0.66); }
.activity__grid .lv3 { background: rgba(215, 228, 255, 0.95); }
.activity__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 0; }
.activity__stats div { display: grid; gap: 2px; }
.activity__stats dt { font-size: var(--step-small); color: var(--muted); }
.activity__stats dd { margin: 0; font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.activity__cap { font-size: var(--step-small); color: var(--muted); }

/* ── 보안 뉴스 ───────────────── */
.news { display: grid; align-content: start; gap: 0; min-height: 0; overflow: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
.news a { display: grid; grid-template-columns: 5.4em minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 6px 8px; margin-inline: -8px; border-radius: 10px; text-decoration: none; font-size: var(--step-small); }
.news a:hover, .news a:focus-visible { background: rgba(255, 255, 255, 0.07); }
.news__src { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .news a { grid-template-columns: 1fr auto; }
  .news__src { grid-column: 1 / -1; }
}

/* 오른쪽: 잔디 위, 상태줄 아래 */
.dash__side { display: grid; gap: 14px; justify-items: end; }
.dash__status [hidden] { display: none; }
@media (max-width: 1024px) {
  .dash__side { justify-items: start; width: 100%; }
}

/* ── D-day ─────────────────────────────── */
.tile--dday { grid-template-rows: auto auto minmax(0, 1fr) auto; align-content: stretch; }
.dday__add-btn { border: 0; background: none; padding: 0; font: inherit; font-size: var(--step-small); color: var(--muted); cursor: pointer; }
.dday__add-btn:hover { color: var(--ink); }
.dday__main { display: grid; gap: 10px; }
.dday__big { font-size: clamp(3rem, 4.8vw, 4.5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.dday__big.is-past { color: var(--muted); }
.dday__name { font-size: var(--step-body); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.dday__date { font-size: var(--step-small); color: var(--muted); }
.dday__hint { color: var(--muted); font-size: var(--step-small); }
.dday__hint code { font-size: 0.75rem; }
.dday__list { display: grid; align-content: start; gap: 2px; min-height: 0; overflow: auto; overflow-x: hidden; margin-top: 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
.dday__list li { display: grid; grid-template-columns: 4.4em minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 1px 0; font-size: var(--step-small); }
.dday__list li b { font-variant-numeric: tabular-nums; }
.dday__list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dday__list li time { color: var(--muted); white-space: nowrap; }
.dday__list li.is-past { opacity: 0.5; }
.dday__list .dday__top-actions { display: block; padding-top: 6px; }
.dday__list .dday__top-actions button { border: 0; background: none; padding: 0; font: inherit; font-size: 0.75rem; color: var(--muted); cursor: pointer; }
.dday__icon { min-width: 26px; height: 26px; padding: 0 6px; font-size: 0.75rem; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.dday__icon:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.dday__form[hidden] { display: none; }
.dday__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.dday__form input[type='text'], .dday__form input[type='date'] { min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: var(--ink); font: inherit; font-size: var(--step-small); color-scheme: dark; }
.dday__form input[type='text'] { grid-column: 1 / -1; }
.dday__check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step-small); color: var(--muted); }
.dday__form .btn { justify-self: start; }
.dday__cancel { border: 0; background: none; padding: 0; font: inherit; font-size: var(--step-small); color: var(--muted); cursor: pointer; justify-self: end; }

/* D-day 이름 자동완성 (캘린더 일정) */
.dday__suggest-wrap { position: relative; grid-column: 1 / -1; }
.dday__suggest-wrap input { width: 100%; }
.dday__suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; display: grid; padding: 4px; border-radius: 12px; background: rgba(24, 26, 32, 0.96); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 28px -10px rgba(0, 0, 0, 0.8); max-height: 220px; overflow: auto; } /* taste-skill-ignore: 떠 있는 자동완성 목록 */
.dday__suggest[hidden] { display: none; }
.dday__suggest li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 7px 10px; border-radius: 8px; font-size: var(--step-small); cursor: pointer; }
.dday__suggest li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dday__suggest li time { color: var(--muted); white-space: nowrap; }
.dday__suggest li[aria-selected='true'], .dday__suggest li:hover { background: rgba(255, 255, 255, 0.1); }
.dday__suggest .is-empty { display: block; color: var(--muted); cursor: default; }
/* 목록이 열려 있는 동안은 칸 밖으로 나와 보이게 */
.tile--dday:has(.dday__suggest:not([hidden])) { overflow: visible; z-index: 3; }

/* Log 칸의 탭: Log(최신 글) ↔ 알림 */
.tabs { position: relative; display: flex; gap: 4px; margin-left: -10px; }
.tabs button { position: relative; z-index: 1; border: 0; background: none; padding: 3px 10px; border-radius: 999px; transition: color 300ms ease; font: inherit; font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tabs button[aria-selected='true'] { color: var(--ink); }
.tabs button:hover { color: var(--ink); }
.tabs__count { transition: opacity 350ms ease, transform 350ms ease; min-width: 1.5em; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1.5; text-align: center; letter-spacing: 0; }
.tabs__count[hidden], .alerts[hidden], .term[hidden] { display: none; }
.alerts { display: grid; gap: 2px; align-content: start; overflow: auto; overflow-x: hidden; min-height: 0; margin: 4px 0 0; padding: 0; list-style: none; font-size: var(--step-small); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
.alerts li > * { display: grid; grid-template-columns: 1.2em minmax(0, 1fr) auto; gap: 8px; align-items: baseline; margin: 0; padding: 5px 6px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.alerts a:hover { background: rgba(255, 255, 255, 0.07); }
.alerts span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alerts time { font-size: var(--step-small); color: var(--muted); white-space: nowrap; }
.alerts .is-warn b { color: var(--accent-text); }
.alerts .is-empty { display: block; color: var(--muted); padding: 5px 6px; }
.alerts b { font-weight: 700; text-align: center; color: var(--muted); }
/* 고른 탭 뒤에서 미끄러지는 유리 알약 */
.tabs__pill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.09); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 1px 1px 0 -0.5px rgba(255, 255, 255, 0.35); transition: transform 420ms cubic-bezier(0.3, 1.4, 0.5, 1), width 420ms cubic-bezier(0.3, 1.4, 0.5, 1); pointer-events: none; } /* taste-skill-ignore: 사용자 요청 유리 탭 */
.tabs__count.is-read { opacity: 0; transform: scale(0.4); }
/* 제목: URIGG ↔ Security.log Website가 지지직 바뀐다. 긴 쪽은 한 줄에 들어오게 글씨 크기를 맞춘다 */
.dash__name { display: block; white-space: nowrap; transition: font-size 500ms ease; }
@media (prefers-reduced-motion: reduce) { .tabs__pill, .tabs button, .tabs__count, .dash__name { transition: none; } }
