@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --desktop:  #060608;
  --win-bg:   #f0f0f0;
  --win-body: #ffffff;
  --bar-from: #6a6a6a;
  --bar-to:   #2a2a2a;
  --border-l: #e0e0e0;
  --border-d: #5a5a5a;
  --text:     #111111;
  --text-mid: #555555;
  --text-dim: #888888;
  --px:       'Press Start 2P', monospace;
  --body:     'Pretendard', -apple-system, 'Noto Sans KR', sans-serif;
}

/* ── 기본 ─────────────────────────────────────── */
body {
  font-family: var(--body);
  background: var(--desktop);
  background-image: radial-gradient(circle, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 4px 4px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Boot Screen ─────────────────────────────── */
#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0e0e0e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--px);
}

#boot-screen.boot-out { animation: boot-fade 0.9s ease forwards; }
@keyframes boot-fade { to { opacity: 0; } }

.boot-inner { display: flex; flex-direction: column; align-items: center; }

.boot-logo { text-align: center; margin-bottom: 44px; }

.boot-title {
  font-family: var(--px);
  font-size: 1.3rem;
  color: #e0e0e0;
  letter-spacing: 6px;
  margin-bottom: 14px;
  transform: scaleY(1.13);
  display: block;
}

.boot-subtitle {
  font-family: var(--px);
  font-size: 0.4rem;
  color: #3a3a3a;
  letter-spacing: 3px;
  transform: scaleY(1.13);
  display: block;
}

#cat-canvas { display: block; image-rendering: pixelated; }

.xp-bar-track {
  width: 220px;
  height: 18px;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  padding: 2px;
  overflow: hidden;
}

.xp-bar-moving {
  height: 100%;
  display: flex;
  gap: 4px;
  width: max-content;
  animation: xp-march 0.72s linear infinite;
}

.xp-seg {
  width: 20px;
  height: 100%;
  flex-shrink: 0;
  background: linear-gradient(to bottom, #d8d8d8 0%, #aaa 50%, #777 100%);
}

@keyframes xp-march {
  from { transform: translateX(0); }
  to   { transform: translateX(-24px); }
}

.boot-loading-text {
  font-family: var(--px);
  font-size: 0.4rem;
  color: #555;
  letter-spacing: 2px;
  margin-top: 18px;
  transition: opacity 0.15s;
  transform: scaleY(1.13);
  display: inline-block;
}

.boot-copyright {
  font-family: var(--px);
  position: absolute;
  bottom: 28px;
  font-size: 0.28rem;
  color: #2a2a2a;
  letter-spacing: 1px;
  transform: scaleY(1.13);
}

/* ── Nav ─────────────────────────────────────── */
#topnav {
  background: linear-gradient(to bottom, #555 0%, #1e1e1e 100%);
  border-bottom: 2px solid #111;
  padding: 0 16px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.nav-brand {
  font-family: var(--px);
  color: #e0e0e0;
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-decoration: none;
  white-space: nowrap;
  transform: scaleY(1.13);
}

.nav-links { display: flex; gap: 4px; margin-left: auto; }

.nav-links a {
  font-family: var(--body);
  color: #aaa;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.1s, border-color 0.1s;
}

.nav-links a:hover, .nav-links a.active {
  color: #fff;
  border-color: #666;
  background: rgba(255,255,255,0.07);
}

/* ── Desktop (스크롤 레이아웃) ───────────────── */
#desktop {
  flex: 1;
  display: flex;
  gap: 14px;
  padding: 14px 14px 60px; /* 60px: 하단 taskbar 여백 */
  align-items: flex-start;
}

/* 왼쪽 240px 고정, 스크롤 따라 sticky */
.col-left {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: flex-start;
  position: sticky;
  top: 58px;
}

/* 오른쪽 나머지 */
.col-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* ── Calendar 모달 ──────────────────────────── */
.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(0,0,0,0.52);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-modal.hidden { display: none; }

/* ── Works modal ── */
.works-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(0,0,0,0.52);
  display: flex;
  align-items: center;
  justify-content: center;
}
.works-modal.hidden { display: none; }
.works-win {
  width: 680px;
  max-width: 95vw;
  height: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.works-addr-bar {
  font-family: var(--body);
  font-size: 0.72rem;
  background: #fff;
  border: 2px solid;
  border-color: #aaa #ddd #ddd #aaa;
  padding: 3px 8px;
  margin: 4px 6px 0;
  color: #444;
  letter-spacing: 0.3px;
}
.works-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  padding: 8px !important;
}
.works-upload-btn {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.works-upload-btn:hover { color: var(--text); }
.works-upload-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 6px 4px;
  background: #f0f0f0;
  border: 1px solid #ccc;
}
.works-title-input {
  font-family: var(--body);
  font-size: 0.82rem;
  flex: 1;
  border: 2px solid;
  border-color: #aaa #ddd #ddd #aaa;
  padding: 4px 8px;
  background: #fff;
}
.works-confirm-btn, .works-cancel-btn {
  font-family: var(--body);
  font-size: 0.78rem;
  padding: 4px 12px;
  border: 2px solid;
  border-color: #ddd #aaa #aaa #ddd;
  cursor: pointer;
  background: #d4d0c8;
}
.works-confirm-btn:hover { background: #c8c4bc; }
.works-cancel-btn:hover  { background: #c8c4bc; }
.works-grid {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px;
  padding: 4px;
}
.works-item {
  width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 6px;
  border: 1px solid transparent;
  user-select: none;
}
.works-item:hover { background: rgba(0,0,128,0.06); border-color: rgba(0,0,128,0.2); }
.works-item.selected { background: rgba(0,0,128,0.13); border-color: rgba(0,0,128,0.4); }
.works-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  image-rendering: auto;
  border: 1px solid #ccc;
}
.works-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: 1px solid #ccc;
  font-size: 2.2rem;
}
.works-name {
  font-family: var(--body);
  font-size: 0.72rem;
  color: var(--text);
  text-align: center;
  margin-top: 4px;
  word-break: break-word;
  line-height: 1.3;
  max-width: 100%;
}
.works-empty {
  font-family: var(--body);
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  padding: 40px 0;
  width: 100%;
}
.works-del-btn {
  font-family: var(--body);
  font-size: 0.65rem;
  background: transparent;
  border: none;
  color: #bbb;
  cursor: pointer;
  margin-top: 2px;
  display: none;
}
.works-item:hover .works-del-btn { display: block; }
.works-del-btn:hover { color: #c00; }
/* viewer overlay */
.works-viewer {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
}
.works-viewer.hidden { display: none; }
.works-viewer-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border: 2px solid #555;
}
.works-viewer-close {
  position: absolute;
  top: 18px; right: 24px;
  font-family: var(--body);
  font-size: 1.4rem;
  color: #ccc;
  cursor: pointer;
  background: none;
  border: none;
}
.works-viewer-close:hover { color: #fff; }
.works-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.8rem;
  color: #ccc;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 18px;
  transition: color 0.15s;
  user-select: none;
}
.works-viewer-nav:hover { color: #fff; }
#viewer-prev { left: 20px; }
#viewer-next { right: 20px; }

.cal-modal-win {
  width: 460px;
  max-width: 92vw;
  height: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.cal-modal-win .win-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ── Taskbar apps 영역 ───────────────────────── */
.taskbar-apps {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.taskbar-app-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid #4a4a4a;
  color: #888;
  width: 32px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.taskbar-app-btn:hover  { background: rgba(255,255,255,0.14); color: #ccc; border-color: #666; }
.taskbar-app-btn.active { background: rgba(0,0,0,0.3); border-color: #2a2a2a; color: #aaa; }

/* ── Calendar ──────────────────────────────── */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.cal-nav-btn {
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 600;
  background: #ddd;
  border: 2px solid;
  border-color: #eee #888 #888 #eee;
  padding: 3px 7px;
  cursor: pointer;
  color: #111;
  line-height: 1;
}
.cal-nav-btn:hover  { background: #c8c8c8; }
.cal-nav-btn:active { border-color: #888 #eee #eee #888; transform: translateY(1px); }

.cal-add-btn {
  font-family: var(--body);
  font-size: 0.9rem;
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  margin-right: 4px;
}
.cal-add-btn:hover { color: #fff; }

.cal-title-text {
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
}

.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 2px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 3px;
  flex-shrink: 0;
}

.cal-day-name {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: #666;
  padding: 3px 0;
}
.cal-day-name.sun { color: #b33; }
.cal-day-name.sat { color: #33b; }

/* cal-grid: 주차별 컨테이너 */
.cal-grid { flex: 1; display: flex; flex-direction: column; gap: 1px; min-height: 0; }

/* 각 주차가 남은 세로 공간을 균등하게 나눔 */
.cal-week {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 날짜 숫자 행이 주차 안의 세로 공간을 채움 */
.cal-days-row {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-height: 0;
}

.cal-cell {
  font-family: var(--body);
  font-size: 0.82rem;
  color: #333;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 0;
}
.cal-cell:hover:not(.blank) { background: rgba(0,0,0,0.07); }
.cal-cell.blank   { cursor: default; color: transparent; }
.cal-cell.sun     { color: #b33; }
.cal-cell.sat     { color: #33b; }
.cal-today        { background: #2a2a2a !important; color: #f0f0f0 !important; border-radius: 2px; }
.cal-today.sun,
.cal-today.sat    { color: #f0f0f0 !important; }

.cal-cell-num { line-height: 1; }

/* 이벤트 dot */
.cal-dots {
  display: flex;
  gap: 2px;
  align-self: flex-start;
  padding-left: 3px;
}

.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-event-bar {
  height: 13px;
  display: flex;
  align-items: center;
  padding: 0 5px;
  opacity: 0.88;
  cursor: pointer;
  overflow: hidden;
  margin: 0;
  border-radius: 0;
  transition: opacity 0.1s;
}
.cal-event-bar:hover { opacity: 1; }
.cal-event-bar.bar-start { border-radius: 3px 0 0 3px; }
.cal-event-bar.bar-end   { border-radius: 0 3px 3px 0; }
.cal-event-bar.bar-start.bar-end { border-radius: 3px; }

.cal-event-label {
  font-family: var(--body);
  font-size: 0.62rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* ── Day detail 모달 ─────────────────────────── */
.day-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.day-modal.hidden { display: none; }

.day-modal-win {
  width: 340px;
  max-width: 90vw;
}

.day-modal-empty {
  font-family: var(--body);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  padding: 12px 0;
}

.day-event-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #eee;
}
.day-event-item:last-child { border-bottom: none; }

.day-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.day-event-info { flex: 1; min-width: 0; }

.day-event-name {
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 600;
  color: #111;
}

.day-event-meta {
  font-family: var(--body);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.day-event-del {
  font-family: var(--body);
  font-size: 0.75rem;
  background: none;
  border: 1px solid #ccc;
  color: #888;
  padding: 2px 5px;
  cursor: pointer;
}
.day-event-del:hover { background: #fdd; border-color: #c66; color: #c33; }

/* ── Event add 모달 ──────────────────────────── */
.event-add-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.event-add-modal.hidden { display: none; }

.event-add-win { width: 380px; max-width: 92vw; }

.event-add-form { display: flex; flex-direction: column; gap: 10px; }

.event-add-form label {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  color: #555;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
  display: block;
}

.event-add-form input[type="text"],
.event-add-form input[type="date"],
.event-add-form select {
  width: 100%;
  font-family: var(--body);
  font-size: 0.82rem;
  border: 2px solid;
  border-color: #888 #eee #eee #888;
  background: #fff;
  padding: 5px 7px;
  color: #111;
  box-sizing: border-box;
}

.event-add-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.event-add-form .row3 { display: grid; grid-template-columns: 1fr 1fr 48px; gap: 8px; align-items: end; }

.event-add-form input[type="color"] {
  width: 100%;
  height: 34px;
  border: 2px solid;
  border-color: #888 #eee #eee #888;
  padding: 2px;
  cursor: pointer;
  background: #fff;
}

/* UPCOMING in status.exe */
.upcoming-divider {
  display: block;
  text-align: center;
  width: 100%;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  font-size: 0.65rem;
  white-space: nowrap;
}

.upcoming-dday {
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 700;
  color: #333;
  flex-shrink: 0;
  white-space: nowrap;
}

.upcoming-name {
  font-size: 0.78rem;
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.upcoming-date {
  font-family: var(--body);
  font-size: 0.65rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ── WinXP 창 컴포넌트 ───────────────────────── */
.win {
  border: 2px solid;
  border-color: var(--border-l) var(--border-d) var(--border-d) var(--border-l);
  background: var(--win-bg);
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #888 inset;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

/* ── 리사이즈 핸들 ──────────────────────────── */
.rh { position: absolute; z-index: 10; }
.rh-n  { top:-4px;    left:8px;    right:8px;   height:8px;  cursor:n-resize;  }
.rh-s  { bottom:-4px; left:8px;    right:8px;   height:8px;  cursor:s-resize;  }
.rh-e  { right:-4px;  top:8px;     bottom:8px;  width:8px;   cursor:e-resize;  }
.rh-w  { left:-4px;   top:8px;     bottom:8px;  width:8px;   cursor:w-resize;  }
.rh-ne { top:-5px;    right:-5px;  width:12px;  height:12px; cursor:ne-resize; }
.rh-nw { top:-5px;    left:-5px;   width:12px;  height:12px; cursor:nw-resize; }
.rh-se { bottom:-5px; right:-5px;  width:12px;  height:12px; cursor:se-resize; }
.rh-sw { bottom:-5px; left:-5px;   width:12px;  height:12px; cursor:sw-resize; }

.win-bar {
  font-family: var(--px);
  background: linear-gradient(to bottom, var(--bar-from) 0%, var(--bar-to) 100%);
  padding: 8px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  user-select: none;
}

.win-title {
  color: #e8e8e8;
  font-size: 0.55rem;
  letter-spacing: 1px;
  line-height: 1.8;
  transform: scaleY(1.13);
}

.win-btns { display: flex; gap: 3px; }

.win-btn {
  font-family: var(--px);
  width: 14px;
  height: 14px;
  background: #999;
  border: 1px solid;
  border-color: #ccc #555 #555 #ccc;
  font-size: 0.38rem;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.win-btn.red { background: #888; }

.win-body {
  background: var(--win-body);
  border-top: 1px solid #888;
  padding: 14px 14px;
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
}

/* ── 프로필 ──────────────────────────────────── */

.profile-name {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-sub {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 2;
}

.mbti-badge {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-mid);
  background: #e8e8e8;
  border: 1px solid;
  border-color: #d0d0d0 #aaa #aaa #d0d0d0;
  padding: 3px 14px;
  margin-top: 4px;
  box-shadow: 1px 1px 0 #fff inset, -1px -1px 0 #bbb inset;
}

.profile-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 10px 0;
}

/* ── 상태 ────────────────────────────────────── */
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: #555;
}

.status-text {
  font-size: 0.82rem;
  color: var(--text-mid);
}

/* ── 섹션 레이블 ──────────────────────────────── */
.sec-label {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  margin-bottom: 10px;
  margin-top: 14px;
  text-transform: uppercase;
}

.sec-label:first-child { margin-top: 0; }

/* ── 태그 ────────────────────────────────────── */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.stack-cat-label {
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  margin-top: 8px;
  text-transform: uppercase;
}

.tag {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 500;
  background: #f0f0f0;
  border: 1px solid;
  border-color: #bbb #888 #888 #bbb;
  padding: 3px 9px;
  color: var(--text-mid);
}

/* ── SNS 링크 ────────────────────────────────── */
.sns-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  padding: 7px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.1s;
}

.sns-link:last-child { border-bottom: none; }
.sns-link:hover { color: #000; text-decoration: underline; }

.sns-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 400;
}

.sns-icon {
  width: 22px;
  height: 22px;
  background: #eee;
  border: 1px solid #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* ── 갤러리 ──────────────────────────────────── */
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  gap: 8px;
  margin-bottom: 10px;
}

.gallery-item {
  position: relative;
  border: 2px solid;
  border-color: #bbb #555 #555 #bbb;
  background: #ddd;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  color: #fff;
  font-size: 0.75rem;
  padding: 14px 7px 6px;
  opacity: 0.58;
  line-height: 1.3;
  pointer-events: none;
}

.gallery-item .del-btn {
  position: absolute;
  top: 5px; right: 5px;
  background: rgba(30,30,30,0.75);
  border: none;
  color: #eee;
  font-size: 0.75rem;
  padding: 2px 7px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  font-family: var(--body);
  z-index: 2;
}

.gallery-item:hover .del-btn { opacity: 1; }

/* 더보기 버튼 */
.more-btn-wrap { margin-top: 6px; }

.upload-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-top: 10px;
}

.upload-form input[type="file"] {
  font-family: var(--body);
  font-size: 0.8rem;
  color: var(--text-mid);
}

.upload-caption-input {
  font-family: var(--body);
  font-size: 0.82rem;
  flex: 1;
  min-width: 120px;
  background: var(--win-bg);
  border: 1px solid #ccc;
  border-right: 1px solid #888;
  border-bottom: 1px solid #888;
  color: var(--text);
  padding: 5px 8px;
}

/* ── 갤러리 모달 (더보기) ─────────────────────── */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gallery-modal.hidden { display: none; }

.gallery-modal-inner {
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--border-l) var(--border-d) var(--border-d) var(--border-l);
  width: min(820px, 96vw);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 4px 20px rgba(0,0,0,0.4);
}

.gallery-modal-bar {
  font-family: var(--px);
  background: linear-gradient(to bottom, var(--bar-from), var(--bar-to));
  padding: 8px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.gallery-modal-title {
  color: #e8e8e8;
  font-size: 0.55rem;
  letter-spacing: 1px;
  line-height: 1.8;
  transform: scaleY(1.13);
}

.gallery-modal-body {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
}

.gallery-all-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

/* ── 라이트박스 ───────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox.hidden { display: none; }

.lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
}

.lightbox-date {
  position: absolute;
  top: -26px;
  left: 0;
  font-family: var(--body);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.5px;
}

.lightbox-img {
  max-width: 80vw;
  max-height: 74vh;
  object-fit: contain;
  display: block;
  border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-caption {
  margin-top: 14px;
  font-family: var(--body);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
  max-width: 560px;
}

.lightbox-close {
  position: fixed;
  top: 18px; right: 22px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
  font-size: 1.3rem;
  width: 36px; height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--body);
  transition: border-color 0.15s, color 0.15s;
}

.lightbox-close:hover { border-color: #fff; color: #fff; }

.btn-px {
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 500;
  background: #e8e8e8;
  border: 2px solid;
  border-color: #eee #888 #888 #eee;
  color: var(--text);
  padding: 5px 14px;
  cursor: pointer;
}

.btn-px:hover { background: #ddd; }

/* ── 프로필 사진 ──────────────────────────────── */
.profile-img-box {
  width: 88px;
  height: 88px;
  border: 2px solid;
  border-color: var(--border-d) var(--border-l) var(--border-l) var(--border-d);
  background: #ddd;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.profile-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-img-box .img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  font-size: 0.72rem;
  color: #fff;
  font-weight: 600;
}

.profile-img-box:hover .img-overlay { opacity: 1; }

/* ── Taskbar ─────────────────────────────────── */
#taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 38px;
  background: linear-gradient(to bottom, #555 0%, #1e1e1e 100%);
  border-top: 2px solid #111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 100;
  gap: 12px;
}

.taskbar-clock {
  font-family: var(--px);
  font-size: 0.56rem;
  color: #bbb;
  letter-spacing: 1px;
  transform: scaleY(1.13);
}

body.win-dragging,
body.win-dragging * { cursor: grabbing !important; user-select: none !important; }

/* 드래그 중 floating 창 */
.win.is-floating { box-shadow: 4px 4px 14px rgba(0,0,0,0.55); }

/* ── Skills 게이지 ───────────────────────────── */
.skill-row { margin-bottom: 10px; }
.skill-row:last-child { margin-bottom: 0; }

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.skill-name {
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.skill-pct {
  font-family: var(--px);
  font-size: 0.32rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  transform: scaleY(1.13);
}

.skill-track {
  height: 10px;
  background: #d0d0d0;
  border: 1px solid;
  border-color: #888 #ccc #ccc #888;
  padding: 1px;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(to bottom, #888 0%, #555 50%, #333 100%);
  transition: width 0.4s ease;
}

/* ── Edit 페이지 ─────────────────────────────── */
.edit-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 20px 14px 14px;
}

.edit-inner {
  max-width: 720px;
  margin: 0 auto;
}

.edit-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.edit-label {
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edit-input, .edit-textarea {
  font-family: var(--body);
  font-size: 0.88rem;
  background: #fff;
  border: 2px solid;
  border-color: #888 #ccc #ccc #888;
  color: var(--text);
  padding: 7px 10px;
  line-height: 1.6;
  width: 100%;
}

.edit-textarea { min-height: 80px; resize: vertical; }

.contact-row {
  display: grid;
  grid-template-columns: 50px 1fr 2fr;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.edit-hint {
  font-family: var(--body);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ── Roadmap ─────────────────────────────────── */
.roadmap-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 20px 70px;
}

/* Hero */
.roadmap-hero {
  text-align: center;
  padding: 40px 20px 36px;
  margin-bottom: 32px;
  border-bottom: 1px solid #1e1e1e;
  position: relative;
}

.roadmap-hero-eyebrow {
  font-family: var(--px);
  font-size: 0.38rem;
  color: #555;
  letter-spacing: 2px;
  margin-bottom: 14px;
  transform: scaleY(1.13);
}

.roadmap-hero-title {
  font-family: var(--px);
  font-size: 1.1rem;
  color: #d0d0d0;
  letter-spacing: 4px;
  margin-bottom: 14px;
  text-shadow: 0 0 30px rgba(180,180,255,0.15);
  transform: scaleY(1.13);
}

.roadmap-hero-sub {
  font-family: var(--body);
  font-size: 0.78rem;
  color: #444;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.roadmap-hero-hint {
  font-family: var(--body);
  font-size: 0.68rem;
  color: #3a3a3a;
}

/* Step */
.roadmap-step-win {
  margin-bottom: 0;
}

.step-num-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  flex-shrink: 0;
}

.step-subtitle-label {
  font-family: var(--body);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

/* Node row */
.node-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
}

/* Base node */
.node-card {
  width: 165px;
  min-height: 115px;
  border: 1px solid #1e1e1e;
  background: #0d0d0e;
  padding: 14px 12px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, filter 0.2s;
  text-align: center;
  user-select: none;
  flex-shrink: 0;
  position: relative;
}

/* Unlocked */
.node-card.node-unlocked {
  border-color: var(--step-color, #3a8a58);
  background: #0f1210;
  box-shadow: 0 0 14px color-mix(in srgb, var(--step-color, #3a8a58) 25%, transparent),
              inset 0 0 20px color-mix(in srgb, var(--step-color, #3a8a58) 5%, transparent);
}

.node-card.node-unlocked:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--step-color, #3a8a58) 35%, transparent),
              inset 0 0 20px color-mix(in srgb, var(--step-color, #3a8a58) 8%, transparent);
}

/* Locked — significantly dimmer */
.node-card.node-locked {
  filter: brightness(0.3) grayscale(0.8);
  cursor: pointer;
}

.node-card.node-locked:hover {
  filter: brightness(0.45) grayscale(0.5);
  transform: translateY(-1px);
}

.node-lock-icon {
  font-family: var(--body);
  font-size: 0.8rem;
  margin-bottom: 8px;
  color: #555;
  line-height: 1;
}

.node-unlocked .node-lock-icon {
  color: var(--step-color, #3a8a58);
}

.node-title {
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ccc;
  margin-bottom: 7px;
  line-height: 1.35;
}

.node-desc {
  font-family: var(--body);
  font-size: 0.66rem;
  color: #777;
  line-height: 1.5;
}

/* Connector lines */
.node-line {
  width: 22px;
  height: 1px;
  background: #222;
  flex-shrink: 0;
}

.step-vconnector {
  display: flex;
  justify-content: center;
  padding: 2px 0;
}

.step-vline {
  width: 2px;
  height: 26px;
}

/* node title/desc editing */
.node-title[contenteditable]:focus,
.node-desc[contenteditable]:focus {
  outline: none;
  border-bottom: 1px dashed #555;
}

/* Add node */
.add-node-wrap {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #1a1a1a;
}

.add-node-btn {
  background: none;
  border: 1px dashed #333;
  color: #444;
  font-family: var(--body);
  font-size: 0.72rem;
  padding: 4px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.add-node-btn:hover {
  color: #888;
  border-color: #555;
}

.add-node-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 400px;
}

.add-node-form.hidden {
  display: none;
}

/* ── Auth Nav ────────────────────────────────── */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid #3a3a3a;
}
.nav-user {
  font-family: var(--body);
  font-size: 0.75rem;
  color: #666;
  white-space: nowrap;
}
.nav-link-auth {
  font-family: var(--body);
  font-size: 0.78rem;
  color: #aaa;
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
}
.nav-link-auth:hover {
  color: #fff;
  border-color: #666;
  background: rgba(255,255,255,0.07);
}

/* ── Easter Egg: Sleeping Cat ────────────────── */
#easter-egg {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#easter-egg.hidden { display: none; }

.glitch-wrap { text-align: center; }

.glitch {
  font-family: var(--px);
  font-size: 1.1rem;
  color: #c8c8c8;
  letter-spacing: 8px;
  position: relative;
  display: inline-block;
  animation: glitch-shake 5s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  letter-spacing: 8px;
}

.glitch::before {
  color: #eeeeee;
  animation: glitch-r 5s infinite;
  clip-path: polygon(0 15%, 100% 15%, 100% 42%, 0 42%);
}

.glitch::after {
  color: #686868;
  animation: glitch-b 5s infinite;
  clip-path: polygon(0 58%, 100% 58%, 100% 82%, 0 82%);
}

@keyframes glitch-shake {
  0%, 86%, 100% { transform: none; }
  87% { transform: translate(-3px, 0) skewX(2deg); }
  89% { transform: translate(3px, 0) skewX(-2deg); }
  91% { transform: translate(-1px, 1px); }
  93% { transform: none; }
}

@keyframes glitch-r {
  0%, 86%, 100% { transform: translate(0); opacity: 0; }
  87% { transform: translate(-5px, 1px); opacity: 1; }
  89% { transform: translate(4px, -1px); opacity: 1; }
  91% { transform: translate(-2px, 0);   opacity: 0.5; }
  93% { opacity: 0; }
}

@keyframes glitch-b {
  0%, 86%, 100% { transform: translate(0); opacity: 0; }
  87% { transform: translate(5px, -1px); opacity: 1; }
  89% { transform: translate(-4px, 1px); opacity: 1; }
  91% { transform: translate(2px, 0);    opacity: 0.5; }
  93% { opacity: 0; }
}

.glitch-sub {
  font-family: var(--px);
  font-size: 0.3rem;
  color: #363636;
  letter-spacing: 3px;
  margin-top: 20px;
  display: block;
  transform: scaleY(1.13);
}
