/* ===== 바탕화면 ===== */
.desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--taskbar-h);
  background:
    radial-gradient(ellipse at 20% 15%, rgba(255, 255, 255, 0.12), transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(0, 0, 0, 0.25), transparent 55%),
    linear-gradient(135deg, #0b3d6b 0%, #145a9c 45%, #1c7ac4 100%);
  user-select: none;
  overflow: hidden;
}

.desktop-icons {
  position: absolute;
  top: 8px;
  left: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px 8px;
}

.desktop-icon {
  width: 84px;
  padding: 6px 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: default;
  outline: none;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.desktop-icon.is-selected {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.45);
}

.desktop-icon-image {
  width: 48px;
  height: 48px;
  position: relative;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

.desktop-icon-image > svg {
  width: 100%;
  height: 100%;
}

.desktop-icon-label {
  font-size: 12px;
  line-height: 1.25;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 4px rgba(0, 0, 0, 0.6);
  word-break: keep-all;
  overflow-wrap: break-word;
  max-width: 80px;
  max-height: 2.5em;
  overflow: hidden;
}

/* ===== 창 층 ===== */
.window-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--taskbar-h);
  pointer-events: none;
  overflow: hidden;
}

/* ===== 작업 표시줄 ===== */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-h);
  display: flex;
  align-items: stretch;
  background: rgba(24, 28, 36, 0.96);
  color: #fff;
  user-select: none;
  z-index: 10000;
}

.tb-start {
  width: 48px;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.tb-start svg {
  width: 16px;
  height: 16px;
}

.tb-start:hover,
.tb-start.is-open {
  background: rgba(255, 255, 255, 0.12);
}

.tb-pinned {
  display: flex;
  align-items: stretch;
}

.tb-pin {
  width: 44px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.tb-pin svg {
  width: 22px;
  height: 22px;
}

.tb-pin:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tb-tasks {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-width: 0;
}

.tb-task {
  flex: 0 1 180px;
  min-width: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #fff;
  font-size: 12px;
  cursor: default;
  overflow: hidden;
}

.tb-task:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tb-task.is-active {
  background: rgba(255, 255, 255, 0.18);
  border-bottom-color: #8fc3ff;
}

.tb-task.is-minimized {
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.tb-task-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.tb-task-icon svg {
  width: 16px;
  height: 16px;
}

.tb-task-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-tray {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.tb-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1.2;
  padding: 0 8px;
  height: 100%;
  white-space: nowrap;
}

.tb-clock:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ===== 시작 메뉴 ===== */
.start-menu {
  position: fixed;
  left: 0;
  bottom: var(--taskbar-h);
  width: 300px;
  background: rgba(32, 36, 44, 0.98);
  color: #fff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  user-select: none;
  z-index: 10001;
  padding: 8px 0;
}

.sm-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sm-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a7fc1, #8fc3ff);
}

.sm-user-name {
  font-size: 13px;
}

.sm-items {
  padding: 8px 0;
}

.sm-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 13px;
  text-align: left;
  cursor: default;
}

.sm-item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sm-divider {
  height: 1px;
  margin: 6px 16px;
  background: rgba(255, 255, 255, 0.12);
}

.sm-item-icon {
  width: 20px;
  height: 20px;
}

.sm-item-icon svg {
  width: 20px;
  height: 20px;
}
