/* ────────────────────────────────────────────────
   Portfolio OS — macOS 재현 스타일 (다크 모드)
   ──────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --font: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Segoe UI', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, 'JetBrains Mono', 'D2Coding', monospace;
  --accent: #2f7cf6;            /* macOS 시스템 블루 */
  --accent-soft: rgba(47, 124, 246, 0.22);
  --win-bg: rgba(32, 32, 36, 0.88);
  --panel-bg: rgba(38, 38, 42, 0.78);
  --win-border: rgba(255, 255, 255, 0.14);
  --text: #f2f2f5;
  --text-dim: rgba(242, 242, 245, 0.55);
  --glass: saturate(180%) blur(24px);
  --menubar-h: 26px;
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font);
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  background-color: #0b0d17;
}

/* ── 배경화면 (우클릭 → 배경화면 변경) ───────── */
body[data-wallpaper="sequoia"] {
  background:
    radial-gradient(1200px 800px at 75% 12%, rgba(120, 80, 255, 0.55), transparent 62%),
    radial-gradient(1000px 700px at 15% 85%, rgba(35, 120, 240, 0.5), transparent 64%),
    radial-gradient(800px 600px at 90% 80%, rgba(235, 90, 170, 0.35), transparent 60%),
    radial-gradient(600px 450px at 40% 45%, rgba(90, 60, 200, 0.3), transparent 65%),
    linear-gradient(175deg, #0d0f22 0%, #171436 55%, #0e1124 100%);
}
body[data-wallpaper="sonoma"] {
  background:
    radial-gradient(1100px 750px at 70% 15%, rgba(40, 190, 160, 0.4), transparent 60%),
    radial-gradient(900px 650px at 20% 80%, rgba(20, 110, 130, 0.45), transparent 62%),
    radial-gradient(700px 500px at 85% 85%, rgba(240, 200, 90, 0.18), transparent 60%),
    linear-gradient(175deg, #07131a 0%, #0c2a30 55%, #081419 100%);
}
body[data-wallpaper="graphite"] {
  background:
    radial-gradient(1000px 700px at 70% 10%, rgba(160, 160, 175, 0.2), transparent 60%),
    radial-gradient(900px 600px at 20% 85%, rgba(90, 90, 105, 0.25), transparent 62%),
    linear-gradient(175deg, #0c0c0f 0%, #1b1b21 55%, #101013 100%);
}

a { color: #6aa4ff; }

/* ── 메뉴바 ────────────────────────────────── */
#menubar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--menubar-h); z-index: 700;
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
  background: rgba(18, 18, 24, 0.55);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 2px; }
.mb-menus { display: flex; gap: 2px; }
.mb-menu {
  border: none; background: none; color: var(--text); font-family: inherit; font-size: 13px;
  padding: 3px 9px; border-radius: 4px; cursor: default; line-height: 1;
  display: flex; align-items: center;
}
.mb-appname { font-weight: 700; }
.mb-menu.open, .mb-menu:active { background: rgba(255,255,255,0.18); }
.mb-apple svg { display: block; }
.mb-status {
  border: none; background: none; color: var(--text); font-family: inherit; font-size: 12.5px;
  padding: 3px 7px; border-radius: 4px; cursor: default;
  display: flex; align-items: center; gap: 4px;
}
.mb-status:active { background: rgba(255,255,255,0.18); }
.mb-status svg { display: block; }
#mb-clock { font-variant-numeric: tabular-nums; }
#mb-battery { font-size: 11.5px; }
.mb-batt-glyph { display: flex; align-items: center; }
.mb-batt-pct { font-variant-numeric: tabular-nums; }

/* 드롭다운 / 컨텍스트 메뉴 (공용 스타일) */
.mb-dropdown, .ctx-menu {
  position: fixed; z-index: 900; min-width: 210px; padding: 5px;
  background: var(--panel-bg);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 9px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.5);
}
.ctx-item {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  width: 100%; padding: 4px 11px; border: none; background: none; border-radius: 5px;
  color: var(--text); font-family: inherit; font-size: 13px; text-align: left; cursor: default;
}
.ctx-item:hover:not(.disabled) { background: var(--accent); color: #fff; }
.ctx-item.disabled { color: rgba(242,242,245,0.32); }
.ctx-sep { height: 1px; margin: 5px 10px; background: rgba(255,255,255,0.14); }
.mb-shortcut { color: rgba(242,242,245,0.45); font-size: 12.5px; }
.ctx-item:hover:not(.disabled) .mb-shortcut { color: rgba(255,255,255,0.75); }

/* 제어 센터 */
.control-center {
  position: fixed; z-index: 900; width: 320px; padding: 14px;
  background: var(--panel-bg);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.5);
}
.cc-row { margin-bottom: 12px; }
.cc-row:last-child { margin-bottom: 0; }
.cc-row label { font-size: 12.5px; color: var(--text-dim); display: block; margin-bottom: 6px; }
.cc-row input[type="range"] { width: 100%; accent-color: #fff; }
.cc-toggles { display: flex; gap: 8px; }
.cc-toggle {
  flex: 1; padding: 10px 8px; border-radius: 12px; border: none; cursor: pointer;
  background: rgba(255,255,255,0.1); color: var(--text); font-family: inherit; font-size: 11.5px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.cc-toggle span { font-size: 18px; }
.cc-glyph { display: inline-flex; align-items: center; justify-content: center; height: 20px; }
.cc-glyph svg { width: 19px; height: 19px; }
.cc-toggle.on .cc-glyph svg { color: #fff; }
.cc-toggle small { color: var(--text-dim); font-size: 10.5px; }
.cc-toggle.on { background: var(--accent); }
.cc-toggle.on small { color: rgba(255,255,255,0.8); }
.cc-hint { font-size: 11.5px; color: var(--text-dim); line-height: 1.5; margin-top: 12px; }

#brightness-overlay {
  position: fixed; inset: 0; z-index: 2000; background: #000; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ── 데스크톱 ──────────────────────────────── */
#desktop { position: fixed; inset: var(--menubar-h) 0 0 0; }

#desk-icons {
  position: absolute; top: 14px; right: 12px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.desk-icon {
  width: 92px; padding: 8px 4px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  color: var(--text); cursor: default; font-family: inherit;
}
.desk-icon:hover, .desk-icon:focus-visible { outline: none; }
.desk-icon.selected { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.16); }
.desk-icon.selected .di-label { background: var(--accent); color: #fff; }
.di-glyph { font-size: 40px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); line-height: 1.1; }
.di-glyph svg { width: 46px; height: 46px; display: block; }
.di-label {
  font-size: 12px; text-shadow: 0 1px 4px rgba(0,0,0,0.8); text-align: center;
  padding: 1px 7px; border-radius: 4px; max-width: 92px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Dock ──────────────────────────────────── */
#dock {
  position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 600;
  display: flex; align-items: flex-end; gap: 5px; padding: 7px 9px;
  background: rgba(24, 24, 30, 0.45);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 19px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
.dock-item {
  position: relative; width: 50px; height: 50px; border: none; cursor: default;
  background: none; padding: 0;
  transform-origin: bottom center;
  transition: transform 0.09s ease-out;
}
.dock-glyph {
  width: 100%; height: 100%; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.dock-glyph svg { width: 100%; height: 100%; }
.dock-emoji { font-size: 28px; }
/* 휴지통 등 타일 배경 없이 표시되는 독 아이콘 */
.dock-glyph.dock-bare { background: none; border: none; overflow: visible; }
.dock-glyph.dock-bare svg { width: 82%; height: 82%; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.4)); }
.dock-dot {
  position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,255,255,0.85); opacity: 0; transition: opacity 0.2s;
}
.dock-item.running .dock-dot { opacity: 1; }
.dock-tip {
  position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%);
  padding: 4px 11px; border-radius: 7px; white-space: nowrap;
  background: rgba(30, 30, 36, 0.92); border: 1px solid rgba(255,255,255,0.12);
  font-size: 12.5px; color: var(--text); opacity: 0; pointer-events: none; transition: opacity 0.12s;
}
.dock-item:hover .dock-tip { opacity: 1; }
.dock-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: rgba(255,255,255,0.16); }
@keyframes dock-bounce {
  0%, 100% { translate: 0 0; } 30% { translate: 0 -22px; } 60% { translate: 0 0; } 80% { translate: 0 -8px; }
}
.dock-item.bounce { animation: dock-bounce 0.7s ease; }

/* ── 창 ────────────────────────────────────── */
.window {
  position: absolute;
  display: flex; flex-direction: column;
  background: var(--win-bg);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--win-border); border-radius: 11px;
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: win-in 0.18s ease;
}
@keyframes win-in { from { opacity: 0; transform: scale(0.94) translateY(12px); } }
.window.closing {
  opacity: 0; transform: scale(0.94) translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.window:not(.active) { box-shadow: 0 12px 36px rgba(0,0,0,0.35); }
.window:not(.active) .win-bar { opacity: 0.6; }
.window:not(.active) .light { background: #4a4a50; }
.window.maximized { inset: 4px 4px 72px 4px !important; width: auto !important; height: auto !important; }

.win-bar {
  display: flex; align-items: center; height: 30px; padding: 0 10px;
  background: rgba(255,255,255,0.045);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: default; touch-action: none; flex-shrink: 0;
}
.win-lights { display: flex; gap: 8px; }
.light {
  width: 12px; height: 12px; border-radius: 50%; border: none; cursor: default;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.light span { font-size: 9px; line-height: 1; color: rgba(0,0,0,0.6); opacity: 0; }
.win-lights:hover .light span { opacity: 1; }
.light.close { background: #ff5f57; }
.light.min { background: #febc2e; }
.light.max { background: #28c840; }
.win-title {
  flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-right: 52px; /* 신호등 폭 보정 */
  pointer-events: none; overflow: hidden; white-space: nowrap;
}
.win-title-icon { font-size: 13px; display: inline-flex; align-items: center; }
.win-title-icon svg { width: 15px; height: 15px; display: block; }

.win-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 20px 22px; user-select: text; -webkit-user-select: text; }
.win-body::-webkit-scrollbar { width: 8px; }
.win-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }

.win-grip {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  cursor: nwse-resize; touch-action: none;
}

/* ── Finder ────────────────────────────────── */
.win-body.finder { display: flex; padding: 0; overflow: hidden; }
.fd-side {
  width: 185px; flex-shrink: 0; padding: 10px 8px;
  background: rgba(255,255,255,0.035);
  border-right: 1px solid rgba(255,255,255,0.07);
  overflow-y: auto;
}
.fd-side-title { font-size: 11px; color: var(--text-dim); font-weight: 700; padding: 2px 10px 6px; }
.fd-side-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 4.5px 10px; border: none; border-radius: 6px; background: none;
  color: var(--text); font-family: inherit; font-size: 13px; text-align: left; cursor: default;
}
.fd-side-icon { display: inline-flex; flex-shrink: 0; width: 17px; }
.fd-side-icon svg { width: 17px; height: 17px; display: block; }
.fd-side-item:hover:not(.disabled) { background: rgba(255,255,255,0.1); }
.fd-side-item.disabled { color: var(--text-dim); }
.fd-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fd-toolbar {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
}
.fd-nav {
  width: 26px; height: 26px; border: none; border-radius: 6px; background: none;
  color: var(--text); font-size: 19px; line-height: 1; cursor: default;
}
.fd-nav:hover:not(:disabled) { background: rgba(255,255,255,0.1); }
.fd-nav:disabled { color: rgba(242,242,245,0.25); }
.fd-title { font-weight: 700; font-size: 14px; margin-left: 4px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fd-search {
  width: 150px; padding: 4px 10px; border-radius: 7px; outline: none;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: var(--text); font-family: inherit; font-size: 12.5px;
}
.fd-search:focus { border-color: var(--accent); }
.fd-items {
  flex: 1; overflow-y: auto; padding: 14px;
  display: grid; grid-template-columns: repeat(auto-fill, 96px); gap: 6px;
  align-content: start; justify-content: start; outline: none;
}
.fd-item {
  width: 96px; padding: 8px 4px 6px; border: none; border-radius: 8px; background: none;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--text); font-family: inherit; cursor: default;
}
.fd-item.selected { background: rgba(255,255,255,0.1); }
.fd-item.selected .fd-name { background: var(--accent); color: #fff; }
.fd-icon { font-size: 38px; line-height: 1.15; width: 48px; height: 44px; display: flex; align-items: center; justify-content: center; }
.fd-icon svg { width: 40px; height: 40px; }
.fd-name {
  font-size: 11.5px; text-align: center; padding: 1px 6px; border-radius: 4px; max-width: 92px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fd-empty { grid-column: 1 / -1; text-align: center; color: var(--text-dim); font-size: 13px; padding: 40px 0; }
.fd-pathbar {
  display: flex; align-items: center; gap: 2px; padding: 5px 12px;
  border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
  font-size: 11.5px; overflow-x: auto; white-space: nowrap;
}
.fd-seg { border: none; background: none; color: var(--text-dim); font-family: inherit; font-size: 11.5px; cursor: default; padding: 2px 4px; border-radius: 4px; }
.fd-seg:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.fd-sep { color: rgba(242,242,245,0.3); }

/* ── 훑어보기 (Quick Look) ─────────────────── */
.quicklook {
  position: fixed; inset: 0; z-index: 850;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25);
}
.ql-panel {
  width: min(640px, 86vw); height: min(540px, 78vh);
  display: flex; flex-direction: column;
  background: var(--panel-bg);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6); overflow: hidden;
}
.ql-panel header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; font-size: 13px; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ql-close { border: none; background: none; color: var(--text); font-size: 18px; cursor: pointer; }
.ql-body { flex: 1; overflow: auto; padding: 18px; }
.ql-body pre { font-family: var(--mono); font-size: 13px; line-height: 1.7; white-space: pre-wrap; user-select: text; }
.ql-none { text-align: center; color: var(--text-dim); padding: 60px 0; font-size: 15px; line-height: 2; }

/* ── Spotlight ─────────────────────────────── */
.spotlight { position: fixed; inset: 0; z-index: 950; }
.sp-panel {
  position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
  width: min(600px, 90vw);
  background: var(--panel-bg);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6); overflow: hidden;
}
.sp-inputrow { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 20px; }
.sp-input {
  flex: 1; border: none; background: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 21px; font-weight: 300;
}
.sp-input::placeholder { color: rgba(242,242,245,0.35); }
.sp-results { max-height: 320px; overflow-y: auto; padding: 0 6px 6px; }
.sp-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 12px; border: none; border-radius: 8px; background: none;
  color: var(--text); font-family: inherit; font-size: 13.5px; text-align: left; cursor: default;
}
.sp-item.selected, .sp-item:hover { background: var(--accent); color: #fff; }
.sp-icon { font-size: 20px; width: 26px; height: 26px; text-align: center; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sp-icon svg { width: 24px; height: 24px; display: block; }
.sp-label { flex-shrink: 0; }
.sp-sub { color: var(--text-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-item.selected .sp-sub, .sp-item:hover .sp-sub { color: rgba(255,255,255,0.75); }

/* ── 알림 ──────────────────────────────────── */
#notif-stack {
  position: fixed; top: calc(var(--menubar-h) + 10px); right: 12px; z-index: 960;
  display: flex; flex-direction: column; gap: 10px;
}
.notif {
  display: flex; gap: 11px; align-items: flex-start;
  width: 340px; padding: 12px 14px;
  background: var(--panel-bg);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 13px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  transform: translateX(120%); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: default;
}
.notif.show { transform: translateX(0); }
.notif-icon { font-size: 22px; }
.notif b { font-size: 13px; display: block; margin-bottom: 2px; }
.notif p { font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }

/* ── 시스템 오버레이 ───────────────────────── */
.sys-overlay { position: fixed; inset: 0; z-index: 3000; }
.sys-boot {
  background: #000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 40px;
}
.apple-logo { filter: drop-shadow(0 0 18px rgba(255,255,255,0.15)); }
.boot-bar { width: 170px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.18); overflow: hidden; }
.boot-bar::after {
  content: ''; display: block; height: 100%; width: 0;
  background: #f5f5f7; border-radius: 3px; animation: boot-fill 1.45s ease forwards;
}
@keyframes boot-fill { to { width: 100%; } }

.sys-login {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 48px;
  background: inherit;
  background-color: rgba(10, 10, 18, 0.55);
  backdrop-filter: blur(40px) saturate(160%); -webkit-backdrop-filter: blur(40px) saturate(160%);
  transition: opacity 0.5s ease;
}
.sys-login.done { opacity: 0; pointer-events: none; }
.login-clock { text-align: center; }
.login-clock b { font-size: 68px; font-weight: 800; letter-spacing: -0.02em; display: block; }
.login-clock span { font-size: 17px; color: var(--text-dim); }
.login-card { display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; }
.login-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, #6f8dff, #b06fff);
  box-shadow: 0 10px 30px rgba(110, 120, 255, 0.35);
}
.login-name { font-size: 17px; font-weight: 700; }
.login-pw {
  width: 190px; padding: 7px 14px; border-radius: 999px; outline: none; text-align: center;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.2);
  color: var(--text); font-family: inherit; font-size: 13px;
}
.login-pw::placeholder { color: rgba(242,242,245,0.4); }
.login-hint { font-size: 12px; color: var(--text-dim); }

.sys-sleep, .sys-shutdown {
  background: #000; opacity: 0; transition: opacity 0.7s ease;
  display: flex; align-items: center; justify-content: center;
}
.sys-sleep.show, .sys-shutdown.show { opacity: 1; }
.shutdown-msg { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.shutdown-msg p { font-size: 16px; line-height: 1.8; color: #ddd; }
.shutdown-msg small { color: #777; }

/* ── 앱: 터미널 ────────────────────────────── */
.win-body.terminal {
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  background: rgba(12, 12, 16, 0.88); padding: 10px 12px;
}
.term-block { white-space: pre-wrap; word-break: break-word; margin-bottom: 2px; }
.term-block.echo { margin-top: 6px; }
.term-block.err { color: #ff8080; }
.term-block.dim, .term-block .dim { color: var(--text-dim); }
.term-block b { color: #d8ffc8; }
.t-user { color: #6ee7a0; }
.t-cwd { color: #7fbcff; font-weight: 700; }
.t-pct { color: var(--text); }
.t-dir { color: #7fbcff; font-weight: 700; }
.t-app { color: #6ee0d8; }
.t-match { color: #ffd866; }
.term-line { display: flex; align-items: center; gap: 7px; margin-top: 4px; }
.term-in {
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font-family: inherit; font-size: inherit; caret-color: #d8d8dc;
}

/* ── 앱: TextEdit ──────────────────────────── */
.app-textedit { background: rgba(24, 24, 28, 0.5); }
.te-plain { font-family: var(--mono); font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; }
.te-md h1 { font-size: 22px; margin-bottom: 12px; }
.te-md h2 { font-size: 16px; margin: 18px 0 8px; color: #9fc0ff; }
.te-md p { font-size: 14px; line-height: 1.8; margin-bottom: 6px; }
.te-md ul { padding-left: 20px; margin-bottom: 6px; }
.te-md li { font-size: 14px; line-height: 1.8; }
.te-md code { font-family: var(--mono); font-size: 12.5px; padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,0.1); }
.md-gap { height: 8px; }

/* ── 앱: 이 Mac에 관하여 ───────────────────── */
.app-aboutmac { text-align: center; }
.am-icon { font-size: 64px; margin: 14px 0 10px; }
.app-aboutmac h1 { font-size: 21px; }
.am-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 20px; }
.am-specs { text-align: left; max-width: 300px; margin: 0 auto 18px; }
.am-specs div { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 13px; }
.am-specs span { color: var(--text-dim); flex-shrink: 0; }
.am-note { font-size: 12.5px; color: var(--text-dim); }

/* ── 앱: 정보 가져오기 ─────────────────────── */
.gi-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 15px; }
.gi-icon { font-size: 34px; display: inline-flex; }
.gi-icon svg { width: 40px; height: 40px; display: block; }
.gi-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 13px; }
.gi-rows span { color: var(--text-dim); flex-shrink: 0; }
.gi-rows b { text-align: right; word-break: break-all; }

/* ── 앱: 도움말 ────────────────────────────── */
.app-help h1 { font-size: 19px; margin-bottom: 12px; }
.help-note { font-size: 13px; line-height: 1.7; color: var(--text-dim); margin-bottom: 14px; }
.help-note b { color: var(--text); }
.help-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.help-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 13px; }
.help-table kbd {
  font-family: inherit; font-size: 12px; padding: 2px 8px; border-radius: 5px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap;
}
.app-help code { font-family: var(--mono); font-size: 12px; padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,0.1); }

/* ── 앱: 내 소개 ───────────────────────────── */
.about-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.about-avatar {
  width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, #6f8dff, #b06fff);
  box-shadow: 0 8px 24px rgba(110, 120, 255, 0.35);
}
.about-hero h1 { font-size: 24px; }
.about-hero .en { font-size: 14px; font-weight: 400; color: var(--text-dim); margin-left: 4px; }
.about-hero .role { color: var(--text-dim); font-size: 14px; margin-top: 2px; }
.about-hero .tagline { margin-top: 6px; font-size: 14px; color: #9fc0ff; }
.about-text p { line-height: 1.75; margin-bottom: 10px; font-size: 14.5px; }
.app-about h2 { font-size: 15px; margin: 20px 0 12px; color: var(--text-dim); }
.skill-group { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.skill-cat { font-size: 12.5px; color: var(--text-dim); min-width: 78px; flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px;
  background: var(--accent-soft); color: #a8c6ff; border: 1px solid rgba(47,124,246,0.3);
}

/* ── 앱: 프로젝트 ──────────────────────────── */
.proj-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filter {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; font-family: inherit;
  background: rgba(255,255,255,0.07); color: var(--text); border: 1px solid rgba(255,255,255,0.1);
}
.filter.on { background: var(--accent); color: #fff; font-weight: 700; border-color: transparent; }
.proj-count { font-size: 12.5px; color: var(--text-dim); margin-bottom: 14px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.proj-card {
  text-align: left; padding: 16px; border-radius: 12px; cursor: pointer; font-family: inherit; color: var(--text);
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.09);
  display: flex; flex-direction: column; gap: 7px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.proj-card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.1); border-color: rgba(47,124,246,0.45); }
.proj-cat { font-size: 11px; color: #8fb8ff; font-weight: 600; }
.proj-card h3 { font-size: 15.5px; }
.proj-card p { font-size: 13px; color: var(--text-dim); line-height: 1.55; flex: 1; }
.proj-period { font-size: 11.5px; color: var(--text-dim); }
.proj-detail h1 { font-size: 21px; margin-bottom: 6px; }
.proj-detail .meta { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.proj-detail .summary { font-size: 15px; line-height: 1.7; margin-bottom: 10px; }
.proj-detail .desc { font-size: 14px; line-height: 1.75; color: rgba(242,242,245,0.85); margin-bottom: 14px; }
.proj-detail .chips { margin-bottom: 16px; }
.proj-link {
  display: inline-block; padding: 9px 18px; border-radius: 10px; text-decoration: none;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 13.5px;
}

/* ── 앱: 이력 ──────────────────────────────── */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(47,124,246,0.1));
}
.tl-item { position: relative; padding-bottom: 24px; }
.tl-dot {
  position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(47,124,246,0.2);
}
.tl-period { font-size: 12px; color: #8fb8ff; font-weight: 600; }
.tl-content h3 { font-size: 16px; margin: 4px 0 2px; }
.tl-role { font-size: 13.5px; color: var(--text-dim); margin-bottom: 8px; }
.tl-content ul { padding-left: 18px; }
.tl-content li { font-size: 13.5px; line-height: 1.7; color: rgba(242,242,245,0.85); }

/* ── 앱: 연락처 ────────────────────────────── */
.contact-lead { font-size: 15px; margin-bottom: 18px; color: var(--text-dim); }
.contact-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px;
  border-radius: 12px; text-decoration: none; color: var(--text);
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.09);
  transition: background 0.15s ease, transform 0.15s ease;
}
.contact-row:hover { background: rgba(255,255,255,0.1); transform: translateX(4px); }
.contact-row.primary { border-color: rgba(47,124,246,0.5); background: var(--accent-soft); }
.c-icon { font-size: 20px; }
.c-label { font-weight: 700; font-size: 14px; min-width: 66px; }
.c-value { font-size: 13px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 앱: AI 챗봇 ───────────────────────────── */
.win-body.chat { display: flex; flex-direction: column; padding: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg {
  max-width: 82%; padding: 10px 14px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.chat-msg.assistant { align-self: flex-start; background: rgba(255,255,255,0.09); border-bottom-left-radius: 5px; }
.chat-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.chat-msg.typing { color: var(--text-dim); animation: typing-pulse 0.8s ease infinite alternate; }
@keyframes typing-pulse { from { opacity: 0.45; } to { opacity: 1; } }
.chat-note { align-self: center; font-size: 11.5px; color: var(--text-dim); text-align: center; padding: 2px 10px; }
.chat-form {
  display: flex; gap: 8px; padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}
.chat-in {
  flex: 1; padding: 10px 15px; border-radius: 999px; outline: none;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: var(--text); font-family: inherit; font-size: 13.5px;
}
.chat-in:focus { border-color: var(--accent); }
.chat-form button {
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 18px; font-weight: 800; flex-shrink: 0;
}

/* ── 모바일 ────────────────────────────────── */
@media (max-width: 700px) {
  .mb-menus, #mb-battery, #mb-wifi { display: none; }
  #desk-icons { flex-direction: row; flex-wrap: wrap; top: 10px; right: 8px; left: 8px; justify-content: center; align-items: flex-start; }
  .window, .window.maximized { inset: 32px 4px 74px 4px !important; width: auto !important; height: auto !important; border-radius: 13px; }
  .win-grip { display: none; }
  .light.max { display: none; }
  .fd-side { display: none; }
  .dock-item { width: 44px; height: 44px; }
  .dock-emoji { font-size: 23px; }
  .win-body { padding: 16px 14px; }
  .login-clock b { font-size: 48px; }
  .notif { width: min(340px, calc(100vw - 24px)); }
}
