html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  background: #fff;
}

header {
  height: 48px;
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid #ddd;
  box-sizing: border-box;
}

main {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

#canvas {
  width: 100%;
  height: 100%;
}

#controls {
  position: absolute;
  right: 16px;
  bottom: 16px;

  display: flex;
  gap: 6px;

  padding: 6px;

  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #ddd;
  border-radius: 6px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

#controls button {
  min-width: 38px;
  height: 34px;

  padding: 0 10px;

  border: 1px solid #ccc;
  border-radius: 4px;

  background: #fff;
  cursor: pointer;
}

#controls button:hover {
  background: #f3f3f3;
}

#error {
  padding: 30px;
  text-align: center;
}

body.embed #viewer-header {
  display: none;
}

body.embed main {
  flex: 1;
  height: 100%;
}
