* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: #e9e6e0;
  font: 13px/1.4 system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

.shadow-layer {
  position: fixed;
  inset: 0;
  pointer-events: none; /* shadow paints above windows, drags pass through */
  z-index: 1000;
}

.win {
  position: absolute;
  border-radius: 10px;
  overflow: hidden;
  touch-action: none;
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  height: 28px;
  background: rgba(255, 255, 255, 0.55);
}

.titlebar span { flex: 1; overflow: hidden; white-space: nowrap; }

.titlebar button {
  border: none;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.titlebar button:hover { background: rgba(0, 0, 0, 0.18); }

.panel {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  width: 240px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #ccc;
  border-radius: 8px;
}

.panel label { display: flex; align-items: center; gap: 6px; }
.panel label > select, .panel label > input { flex: 1; min-width: 0; }
.panel label > span { width: 2.5em; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.panel button { padding: 4px; cursor: pointer; }

.perf { width: 100%; border-top: 1px solid #ddd; margin-top: 4px; padding-top: 4px; }
.perf td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.pagelinks { position: fixed; left: 12px; top: 12px; z-index: 1001; opacity: 0.7; }
